Fix memory leak in tibber (#49465)

This commit is contained in:
J. Nick Koston
2021-04-20 06:13:41 -10:00
committed by GitHub
parent 786f3163ac
commit 1193c5360d

View File

@@ -60,7 +60,7 @@ async def async_setup_entry(hass, entry):
async def _close(event):
await tibber_connection.rt_disconnect()
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _close)
entry.async_on_unload(hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _close))
try:
await tibber_connection.update_info()