forked from home-assistant/core
Remove unused attribute EntityInfo.custom_component (#146550)
This commit is contained in:
@@ -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
|
||||
|
@@ -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",
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user