Eagerly shutdown unifiprotect at the stop event (#113655)
This commit is contained in:
parent
69564b1a17
commit
ba7ec4ac16
1 changed files with 3 additions and 1 deletions
|
@ -110,7 +110,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = data_service
|
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = data_service
|
||||||
entry.async_on_unload(entry.add_update_listener(_async_options_updated))
|
entry.async_on_unload(entry.add_update_listener(_async_options_updated))
|
||||||
entry.async_on_unload(
|
entry.async_on_unload(
|
||||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, data_service.async_stop)
|
hass.bus.async_listen_once(
|
||||||
|
EVENT_HOMEASSISTANT_STOP, data_service.async_stop, run_immediately=True
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if not entry.options.get(CONF_ALLOW_EA, False) and (
|
if not entry.options.get(CONF_ALLOW_EA, False) and (
|
||||||
|
|
Loading…
Add table
Reference in a new issue