Unifi websocket manager (#111041)

* Move hub into .hub.hub

* Move websocket to own module

* Minor shuffle
This commit is contained in:
Robert Svensson 2024-02-24 22:20:59 +01:00 committed by GitHub
parent d796085923
commit efc89cd34f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 154 additions and 90 deletions

View file

@ -53,7 +53,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
if len(hass.data[UNIFI_DOMAIN]) == 1:
async_setup_services(hass)
hub.start_websocket()
hub.websocket.start()
config_entry.async_on_unload(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, hub.shutdown)