Fix memory leak in vera (#49459)

This commit is contained in:
J. Nick Koston 2021-04-20 06:12:32 -10:00 committed by GitHub
parent 11281e1cdb
commit 2279b5593d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,9 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
controller.stop()
await hass.async_add_executor_job(controller.start)
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, stop_subscription)
config_entry.async_on_unload(
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, stop_subscription)
)
return True