Commit Graph
56 Commits
Author SHA1 Message Date
8e7deee967 Add pylint checker to check for using registries as fixture (#172455)
Co-authored-by: Markus Tuominen <3738613+Markus98@users.noreply.github.com>
2026-07-22 09:56:23 +03:00
J. Nick KostonandGitHub d0b99bc435 Bump habluetooth to 6.26.5 (#175595) 2026-07-04 11:58:03 -05:00
Franck NijhofGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>frenck
31f98c12af Fix line length violations in tests/components b (#170825)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
2026-05-15 15:51:13 -04:00
J. Nick KostonandGitHub e8c1d3dc3c Add repair issue for Bluetooth adapter passive mode fallback (#152076) 2025-09-11 08:52:57 -04:00
2c72cd3832 Add repair issue for Bluetooth adapters in degraded mode due to missing container permissions (#151947)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-09 23:34:19 -04:00
fca6dc264f Update bleak to 1.0.1 (#147742)
Co-authored-by: J. Nick Koston <nick@koston.org>
2025-07-12 13:11:37 -10:00
epenetandGitHub ed9fd2c643 Use async_load_fixture in async test functions (b-i) (#145714)
* Use async_load_fixture in async test functions (b-i)

* Adjust
2025-06-01 06:31:37 -07:00
Marc MuellerandGitHub 5843e63878 Add contextmanager to reset logger after set_level call in tests (#143295) 2025-04-20 02:13:01 +02:00
J. Nick KostonandGitHub 23f4f97603 Bump habluetooth to 3.27.0 (#140569)
changelog: https://github.com/Bluetooth-Devices/habluetooth/compare/v3.25.1...v3.27.0
2025-03-13 22:57:24 -10:00
J. Nick KostonandGitHub edabf0f8dd Fix incorrect Bluetooth source address when restoring data from D-Bus (#136862) 2025-01-29 13:09:00 -06:00
J. Nick KostonandGitHub e0ea5bfc51 Add Bluetooth WebSocket API to subscribe to connection allocations (#136215) 2025-01-27 11:49:49 -10:00
J. Nick KostonandGitHub cdc96fdf6f Add bluetooth subscribe_advertisements WebSocket API (#134291) 2025-01-10 16:49:53 -10:00
Erik MontnemeryandGitHub 7ec911c4df Correct typing in rediscovery tests (#127777) 2024-10-07 08:42:04 +02:00
Erik MontnemeryandGitHub 7d61cb1ef5 Remove unignore flow (#126765) 2024-09-25 20:29:14 +02:00
b6fe3a3022 Reinitialize bluetooth discovery flow on config entry removal (#126555)
* Reinitialize bluetooth discovery flow on unignore

* Update homeassistant/components/bluetooth/manager.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update tests

* Rediscover on any removed config entry

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-24 14:42:46 +02:00
Marc MuellerandGitHub 2f0dd6f704 Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
epenetandGitHub 5531e54745 Ignore no-name-in-module warnings in tests (#119401) 2024-06-11 16:37:07 +02:00
epenetandGitHub 632238a7f9 Move mock_bluetooth* fixtures to decorator (#118846) 2024-06-06 17:31:08 +02:00
Marc MuellerandGitHub 279483ddb0 Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
epenetandGitHub 80975d7a63 Move None bluetooth fixtures to decorator (#118802) 2024-06-04 16:26:07 +02:00
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
soonsouthandGitHub cfc2f17f35 Remove repetitive words in comments and docstrings (#113529)
chore: remove repetitive words

Signed-off-by: soonsouth <cuibuwei@163.com>
2024-03-15 18:11:12 +01:00
Marc MuellerandGitHub 38adfbf1a3 Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
J. Nick KostonandGitHub bfda3f1ba8 Bump habluetooth to 2.0.1 (#106750)
fixes switching scanners to quickly since the manager failed
to account for jitter in the auto discovered advertising interval

replaces and closes #96531

changelog: https://github.com/Bluetooth-Devices/habluetooth/compare/v2.0.0...v2.0.1
2023-12-31 06:44:55 -10:00
J. Nick KostonandGitHub e50fe79911 Update habluetooth to 2.0.0 (#106145) 2023-12-20 20:37:39 -10:00
J. Nick KostonandGitHub 5dbd0dede1 Refactor Bluetooth scanners to avoid the need to pass a callback (#105607) 2023-12-13 09:17:48 +01:00
J. Nick KostonandGitHub f002a6a732 Refactor all Bluetooth scanners to inherit from BaseHaRemoteScanner (#105523) 2023-12-12 21:28:43 +01:00
J. Nick KostonandGitHub e2abd3b8d0 Bump bluetooth libraries (#105522) 2023-12-12 08:31:23 +01:00
J. Nick KostonandGitHub e890671192 Relocate Bluetooth manager to habluetooth library (#105110)
* Relocate Bluetooth manager to habluetooth library

* Relocate Bluetooth manager to habluetooth library

* Relocate Bluetooth manager to habluetooth library

* fixes

* fix patching time

* fix more tests

* fix more tests

* split

* Bump habluetooth to 0.7.0

changelog: https://github.com/Bluetooth-Devices/habluetooth/compare/v0.6.1...v0.7.0

This is the big change that will move the manager so the HA
PR that will follow this will be a bit larger than the rest of them
since the manager is connected to everything

* fix types

* fix types

* fix types

* fix patch targets

* fix flakey logbook tests (will need another PR)

* mock shutdown

* bump again

* value can be a float now

* Revert "value can be a float now"

This reverts commit b7e7127143.

* float
2023-12-11 15:42:00 -05:00
J. Nick KostonandGitHub dd9c22672a Refactor bluetooth scanners for better seperation of concerns (#104909) 2023-12-02 13:20:06 -10:00
Raman GuptaandGitHub 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
Jc2kandGitHub f0375eb97e Expose bluetooth availability tracking interval controls to integrations (#100774) 2023-09-24 10:45:25 +02:00
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 KostonandGitHub 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 KostonandGitHub f47f49c9a1 Reduce overhead to check bluetooth logging (#92512) 2023-05-07 01:30:54 +02:00
J. Nick KostonandGitHub 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
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 KostonandGitHub 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
epenetandGitHub a16e298599 Adjust json imports in tests (#88248) 2023-02-17 19:13:48 +01:00
epenetandGitHub 1e352b60df Add type hints to integration tests (part 11) (#87996) 2023-02-13 14:22:49 +01:00
epenetandGitHub 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 KostonandGitHub 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 KostonandGitHub bb3feceb57 Fix connectable Bluetooth devices not going available after scanner recovers (#84172) 2022-12-19 13:37:29 +01:00
J. Nick KostonandGitHub 9008006ac8 Restore remote discovered devices between remote scanner restarts (#83699) 2022-12-11 09:02:55 -10:00
Erik MontnemeryandGitHub c4afc33fc5 Add abc.ABC to classes with abstract methods (#83546) 2022-12-08 17:50:36 +01:00
J. Nick KostonandGitHub a7caa038be Accept advertisements from alternate scanners when a scanner stops scanning (#82448) 2022-11-21 21:23:07 -05:00
J. Nick KostonandGitHub 7801cd96de Split bluetooth models into base_scanner and wrappers (#82291) 2022-11-20 08:44:28 -06:00
J. Nick KostonandGitHub 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 KostonandGitHub 5b09ab93dc Immediately prefer advertisements from alternate sources when a scanner goes away (#81357) 2022-11-01 13:07:03 -04:00
J. Nick KostonandGitHub 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