From 1193c5360da01a767713f3e8ff855e249632f45a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 20 Apr 2021 06:13:41 -1000 Subject: [PATCH] Fix memory leak in tibber (#49465) --- homeassistant/components/tibber/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/tibber/__init__.py b/homeassistant/components/tibber/__init__.py index fd7fc389c75..ed5b0c4ce60 100644 --- a/homeassistant/components/tibber/__init__.py +++ b/homeassistant/components/tibber/__init__.py @@ -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()