From fd9d4dbb34fa9d03a05e78a069cb9f0ae2aeab86 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 28 May 2024 15:26:22 -1000 Subject: [PATCH] Use del instead of pop in the entity platform remove (#118337) --- homeassistant/helpers/entity_platform.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/helpers/entity_platform.py b/homeassistant/helpers/entity_platform.py index 46f8fe9c6b7..4dbe3ac68d8 100644 --- a/homeassistant/helpers/entity_platform.py +++ b/homeassistant/helpers/entity_platform.py @@ -905,9 +905,9 @@ class EntityPlatform: def remove_entity_cb() -> None: """Remove entity from entities dict.""" - self.entities.pop(entity_id) - self.domain_entities.pop(entity_id) - self.domain_platform_entities.pop(entity_id) + del self.entities[entity_id] + del self.domain_entities[entity_id] + del self.domain_platform_entities[entity_id] entity.async_on_remove(remove_entity_cb)