mirror of
https://github.com/home-assistant/core.git
synced 2025-11-11 20:10:12 +00:00
Add bluetooth API to remove scanners that are no longer used (#135408)
This commit is contained in:
@@ -319,6 +319,7 @@ def register_hci0_scanner(hass: HomeAssistant) -> Generator[None]:
|
||||
cancel = bluetooth.async_register_scanner(hass, hci0_scanner)
|
||||
yield
|
||||
cancel()
|
||||
bluetooth.async_remove_scanner(hass, hci0_scanner.source)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -328,3 +329,4 @@ def register_hci1_scanner(hass: HomeAssistant) -> Generator[None]:
|
||||
cancel = bluetooth.async_register_scanner(hass, hci1_scanner)
|
||||
yield
|
||||
cancel()
|
||||
bluetooth.async_remove_scanner(hass, hci1_scanner.source)
|
||||
|
||||
Reference in New Issue
Block a user