From e288afa7a34a57f3e59d76092d61a2850e7108e0 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 20 Apr 2021 06:15:04 -1000 Subject: [PATCH] Fix memory leak in plum_lightpad (#49472) --- homeassistant/components/plum_lightpad/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/plum_lightpad/__init__.py b/homeassistant/components/plum_lightpad/__init__.py index aeabe8634f8..ecc1dacfb2f 100644 --- a/homeassistant/components/plum_lightpad/__init__.py +++ b/homeassistant/components/plum_lightpad/__init__.py @@ -76,5 +76,5 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): """Clean up resources.""" plum.cleanup() - hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, cleanup) + entry.async_on_unload(hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, cleanup)) return True