From 867630a4a7ce4733bd764e8707229f01340e07fd Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 27 Mar 2020 00:33:50 +0100 Subject: [PATCH] Remove state when entity is removed from registry (#32184) --- homeassistant/helpers/entity.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 6a238ff84b1..62d46500451 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -542,6 +542,7 @@ class Entity(ABC): data = event.data if data["action"] == "remove" and data["entity_id"] == self.entity_id: await self.async_removed_from_registry() + await self.async_remove() if ( data["action"] != "update"