Remove unused attribute EntityInfo.custom_component (#146550)

This commit is contained in:
Erik Montnemery 2025-06-11 17:27:17 +02:00 committed by GitHub
parent 54c8e59bcd
commit e39edcc234
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 5 deletions

View File

@ -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

View File

@ -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",
},
}