Run bond shutdown listener with run_immediately (#113657)

pull/113768/head
J. Nick Koston 2024-03-16 17:21:03 -10:00 committed by GitHub
parent 309fcb5c30
commit 6df3e9d7c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -68,7 +68,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
entry.async_on_unload(_async_stop_event)
entry.async_on_unload(
hass.bus.async_listen(EVENT_HOMEASSISTANT_STOP, _async_stop_event)
hass.bus.async_listen(
EVENT_HOMEASSISTANT_STOP, _async_stop_event, run_immediately=True
)
)
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = BondData(hub, bpup_subs)