Commit graph

26 commits

Author SHA1 Message Date
Raman Gupta
067b94899f
Move EVENT_LOGGING_CHANGED to constants (#100974)
* Move EVENT_LOGGING_CHANGED to constants

* fix test

* remove logger as dependency for bluetooth and fix test
2023-09-27 01:06:14 -04:00
Jc2k
f0375eb97e
Expose bluetooth availability tracking interval controls to integrations (#100774) 2023-09-24 10:45:25 +02:00
Allen Porter
12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
J. Nick Koston
2a5ffa9a5b
Fix timestamps for bluetooth scanners that bundle advertisements (#94511)
#94138 added support for raw/bundled advertisements. We should use the
same monotonic time for all advertisements in the bundle if not time
is passed, or calculate the timestamp and pass it if its known
2023-06-14 21:47:00 -04:00
J. Nick Koston
f47f49c9a1
Reduce overhead to check bluetooth logging (#92512) 2023-05-07 01:30:54 +02:00
J. Nick Koston
f8fa382ebc
Add test coverage for bluetooth devices being rediscoverable after they go unavailable (#91645)
* Fix bluetooth devices not being discovered after they go unavailable and reavailable

* Update homeassistant/components/bluetooth/manager.py
2023-04-19 11:25:38 -04:00
J. Nick Koston
c3043fb0ee
Bump bluetooth deps for bleak 0.20 (#89925)
Co-authored-by: K <z@kwi.li>
2023-03-20 12:06:15 +01:00
J. Nick Koston
331102e592
Dismiss discoveries when the underlying device disappears (#88340)
* Implement discovery removals

Bluetooth, HomeKit, SSDP, and Zeroconf now implement
dismissing discoveries when the underlying discovered
device disappears

* cover

* add zeroconf test

* cover

* cover bluetooth

* fix rediscover
2023-02-17 15:51:19 -05:00
epenet
a16e298599
Adjust json imports in tests (#88248) 2023-02-17 19:13:48 +01:00
epenet
1e352b60df
Add type hints to integration tests (part 11) (#87996) 2023-02-13 14:22:49 +01:00
epenet
0cf5e9fb4a
Add type hints to integration tests (part 2) (#87789)
* Add type hints to integration tests (part 2)

* typo

* Improve analytics

* Improve automation

* Imrpove bluetooth
2023-02-10 16:05:26 +01:00
J. Nick Koston
d0c7f42559
Fix Bluetooth discoveries missing between restarts (#86808)
* Fix Bluetooth discoveries missing between restarts

* do not load other integrations

* coverage
2023-01-27 22:16:16 -05:00
J. Nick Koston
bb3feceb57
Fix connectable Bluetooth devices not going available after scanner recovers (#84172) 2022-12-19 13:37:29 +01:00
J. Nick Koston
9008006ac8
Restore remote discovered devices between remote scanner restarts (#83699) 2022-12-11 09:02:55 -10:00
Erik Montnemery
c4afc33fc5
Add abc.ABC to classes with abstract methods (#83546) 2022-12-08 17:50:36 +01:00
J. Nick Koston
a7caa038be
Accept advertisements from alternate scanners when a scanner stops scanning (#82448) 2022-11-21 21:23:07 -05:00
J. Nick Koston
7801cd96de
Split bluetooth models into base_scanner and wrappers (#82291) 2022-11-20 08:44:28 -06:00
J. Nick Koston
47c66dbed4
Offload platform specific bluetooth code to bluetooth-adapters (#82196)
* Offload platform specific bluetooth code to bluetooth-adapters

* adjust

* fix some more patch targets

* more test fixes

* almost there

* may not be setup yet

* more fixes

* fixes

* fix test

* fix merge
2022-11-17 14:34:19 -05:00
J. Nick Koston
5b09ab93dc
Immediately prefer advertisements from alternate sources when a scanner goes away (#81357) 2022-11-01 13:07:03 -04:00
J. Nick Koston
f70f972d88
Fix connectable Bluetooth devices not being seen if the nearest scanner is non-connectable (#80388)
If we saw the non-connectable scanner advertisement first we would reject
the connectable scanner advertisement because it had worse signal strength.

In this case we need to check both
2022-10-17 21:13:26 -04:00
J. Nick Koston
d12cbab6c4
Bump bleak to 0.19.0 (#80349) 2022-10-15 13:57:23 -04:00
J. Nick Koston
0c76e3a97e
Automatically determine the advertising interval for bluetooth devices (#79669) 2022-10-14 14:39:18 -04:00
J. Nick Koston
488b04fc8b
Handle default RSSI values from bleak in bluetooth (#78908) 2022-09-21 17:03:50 -04:00
J. Nick Koston
18eef5da1f
Restore history from bluetooth stack at startup (#78612) 2022-09-17 16:58:19 -05:00
J. Nick Koston
3938015c93
Add support for scanners that do not provide connectable devices (#77132) 2022-08-22 14:02:26 -04:00
J. Nick Koston
071cae2c0b
Implement auto switching when there are multiple bluetooth scanners (#76947) 2022-08-17 12:38:04 -10:00