Fix memory leak in verisure (#49460)
This commit is contained in:
parent
c07646db5d
commit
fd21c460a0
1 changed files with 3 additions and 1 deletions
|
@ -127,7 +127,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
if not await coordinator.async_login():
|
||||
raise ConfigEntryAuthFailed
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, coordinator.async_logout)
|
||||
entry.async_on_unload(
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, coordinator.async_logout)
|
||||
)
|
||||
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue