From e39edcc23459393ddd58a718bacf04b752ce0508 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 11 Jun 2025 17:27:17 +0200 Subject: [PATCH] Remove unused attribute EntityInfo.custom_component (#146550) --- homeassistant/helpers/entity.py | 3 --- tests/helpers/test_entity.py | 2 -- 2 files changed, 5 deletions(-) diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index 8b13ee2409a..ad029633f8e 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -199,7 +199,6 @@ class EntityInfo(TypedDict): """Entity info.""" domain: str - custom_component: bool config_entry: NotRequired[str] @@ -1450,10 +1449,8 @@ class Entity( Not to be extended by integrations. """ - is_custom_component = "custom_components" in type(self).__module__ entity_info: EntityInfo = { "domain": self.platform.platform_name, - "custom_component": is_custom_component, } if self.platform.config_entry: entity_info["config_entry"] = self.platform.config_entry.entry_id diff --git a/tests/helpers/test_entity.py b/tests/helpers/test_entity.py index 61396d97359..92f73132292 100644 --- a/tests/helpers/test_entity.py +++ b/tests/helpers/test_entity.py @@ -827,12 +827,10 @@ async def test_setup_source(hass: HomeAssistant) -> None: assert entity.entity_sources(hass) == { "test_domain.platform_config_source": { - "custom_component": False, "domain": "test_platform", }, "test_domain.config_entry_source": { "config_entry": platform.config_entry.entry_id, - "custom_component": False, "domain": "test_platform", }, }