Remove state when entity is removed from registry (#32184)
This commit is contained in:
1 parent
a6d5ed0160
commit
867630a4a7
1 file changed
+1
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user