Fix memory leak in verisure (#49460)

This commit is contained in:
J. Nick Koston 2021-04-20 06:04:34 -10:00 committed by GitHub
parent c07646db5d
commit fd21c460a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()