Rework UniFi websocket (#100614)
* Rework websocket management * remove unnecessary fixture * Remove controller from mock_unifi_websocket * Mock api.login in reconnect method * Remove unnecessary edits * Minor clean up * Bump aiounifi to v63 * Wait on task cancellation
This commit is contained in:
parent
134c005168
commit
01b5854968
13 changed files with 184 additions and 157 deletions
|
@ -52,7 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||
if len(hass.data[UNIFI_DOMAIN]) == 1:
|
||||
async_setup_services(hass)
|
||||
|
||||
api.start_websocket()
|
||||
controller.start_websocket()
|
||||
|
||||
config_entry.async_on_unload(
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, controller.shutdown)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue