Use entity_sources to determine integration in recorder platforms (#88382)

This commit is contained in:
Erik Montnemery 2023-02-18 14:21:41 +01:00 committed by GitHub
parent 728f0d5b3b
commit 83e5bf7ae8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 19 deletions

View file

@ -247,6 +247,7 @@ async def async_test_home_assistant(event_loop, load_registries=True):
)
# Load the registries
entity.async_setup(hass)
if load_registries:
with patch("homeassistant.helpers.storage.Store.async_load", return_value=None):
await asyncio.gather(
@ -1087,6 +1088,11 @@ class MockEntity(entity.Entity):
"""Return the entity category."""
return self._handle("entity_category")
@property
def extra_state_attributes(self) -> Mapping[str, Any] | None:
"""Return entity specific state attributes."""
return self._handle("extra_state_attributes")
@property
def has_entity_name(self) -> bool:
"""Return the has_entity_name name flag."""