Add bluetooth API to remove scanners that are no longer used (#135408)

This commit is contained in:
J. Nick Koston
2025-01-12 14:03:05 -10:00
committed by GitHub
parent 0a444de39c
commit c9a7afe439
6 changed files with 39 additions and 0 deletions

View File

@@ -253,6 +253,11 @@ class HomeAssistantBluetoothManager(BluetoothManager):
unregister = super().async_register_scanner(scanner, connection_slots)
return partial(self._async_unregister_scanner, scanner, unregister)
@hass_callback
def async_remove_scanner(self, source: str) -> None:
"""Remove a scanner."""
self.storage.async_remove_advertisement_history(source)
@hass_callback
def _handle_config_entry_removed(
self,