mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Improve type hint in entity_component (#80596)
Imrpove type hint in entity_component
This commit is contained in:
parent
454394a242
commit
eb93372cd6
@ -37,6 +37,7 @@ _EntityT = TypeVar("_EntityT", bound=entity.Entity)
|
|||||||
async def async_update_entity(hass: HomeAssistant, entity_id: str) -> None:
|
async def async_update_entity(hass: HomeAssistant, entity_id: str) -> None:
|
||||||
"""Trigger an update for an entity."""
|
"""Trigger an update for an entity."""
|
||||||
domain = entity_id.split(".", 1)[0]
|
domain = entity_id.split(".", 1)[0]
|
||||||
|
entity_comp: EntityComponent[entity.Entity] | None
|
||||||
entity_comp = hass.data.get(DATA_INSTANCES, {}).get(domain)
|
entity_comp = hass.data.get(DATA_INSTANCES, {}).get(domain)
|
||||||
|
|
||||||
if entity_comp is None:
|
if entity_comp is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user