mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 00:07:10 +00:00
Fix nest to cancel event listener on config entry unload (#119257)
This commit is contained in:
parent
8b6fbd5b3f
commit
f046545883
@ -224,7 +224,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Close connection when hass stops."""
|
||||
subscriber.stop_async()
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)
|
||||
entry.async_on_unload(
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)
|
||||
)
|
||||
|
||||
hass.data[DOMAIN][entry.entry_id] = {
|
||||
DATA_SUBSCRIBER: subscriber,
|
||||
|
Loading…
x
Reference in New Issue
Block a user