This commit is contained in:
J. Nick Koston
2024-03-07 10:51:15 -10:00
parent 6d50499803
commit 2a3d1c9040
+5 -1
View File
@@ -641,7 +641,11 @@ class EntityPlatform:
@callback
def _async_handle_interval_callback(self, now: datetime) -> None:
"""Update all the entity states in a single platform."""
self.hass.async_create_task(self._update_entity_states(now), eager_start=True)
self.hass.async_create_periodic_task(
self._update_entity_states(now),
name=f"EntityPlatform poll {self.domain}.{self.platform_name}",
eager_start=True,
)
def _entity_id_already_exists(self, entity_id: str) -> tuple[bool, bool]:
"""Check if an entity_id already exists.