Make group _update_at_start a callback (#102286)

This commit is contained in:
J. Nick Koston 2023-10-18 22:41:39 -10:00 committed by GitHub
parent 870e38e8ba
commit 393544b3e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -526,12 +526,13 @@ class GroupEntity(Entity):
self.hass, self._entity_ids, async_state_changed_listener
)
)
self.async_on_remove(start.async_at_start(self.hass, self._update_at_start))
async def _update_at_start(_: HomeAssistant) -> None:
self.async_update_group_state()
self.async_write_ha_state()
self.async_on_remove(start.async_at_start(self.hass, _update_at_start))
@callback
def _update_at_start(self, _: HomeAssistant) -> None:
"""Update the group state at start."""
self.async_update_group_state()
self.async_write_ha_state()
@callback
def async_defer_or_update_ha_state(self) -> None: