Schedule Unifi shutdown callback earlier (#33257)
This commit is contained in:
parent
cced74740f
commit
a38e075bda
1 changed files with 2 additions and 2 deletions
|
@ -83,6 +83,8 @@ async def async_setup_entry(hass, config_entry):
|
|||
controller_id = get_controller_id_from_config_entry(config_entry)
|
||||
hass.data[DOMAIN][controller_id] = controller
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, controller.shutdown)
|
||||
|
||||
if controller.mac is None:
|
||||
return True
|
||||
|
||||
|
@ -96,8 +98,6 @@ async def async_setup_entry(hass, config_entry):
|
|||
# sw_version=config.raw['swversion'],
|
||||
)
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, controller.shutdown)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue