Relocate Bluetooth manager to habluetooth library

This commit is contained in:
J. Nick Koston
2023-12-05 11:46:20 -10:00
parent e3056066bb
commit 5df8f28c90

View File

@@ -26,6 +26,7 @@ from habluetooth import (
HaBluetoothConnector,
HaScanner,
ScannerStartError,
set_manager,
)
from home_assistant_bluetooth import BluetoothServiceInfo, BluetoothServiceInfoBleak
@@ -146,6 +147,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
manager = HomeAssistantBluetoothManager(
hass, integration_matcher, bluetooth_adapters, bluetooth_storage, slot_manager
)
set_manager(manager)
await manager.async_setup()
hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_STOP, lambda event: manager.async_stop()