Skip to content

Commit

Permalink
Schedule Unifi shutdown callback earlier (home-assistant#33257)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlawren authored Mar 25, 2020
1 parent 8f4d314 commit 5650b39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/unifi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,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

Expand All @@ -53,8 +55,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


Expand Down

0 comments on commit 5650b39

Please sign in to comment.