Skip to content

Commit

Permalink
Make group _update_at_start a callback (home-assistant#102286)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Oct 19, 2023
1 parent 870e38e commit 393544b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions homeassistant/components/group/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,13 @@ def async_state_changed_listener(
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:
Expand Down

0 comments on commit 393544b

Please sign in to comment.