Mark sonos group update a background task (#118333)

pull/118325/head^2
J. Nick Koston 2024-05-28 14:53:28 -10:00 committed by GitHub
parent 9e1676bee4
commit 097ca3a0ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -830,8 +830,10 @@ class SonosSpeaker:
if "zone_player_uui_ds_in_group" not in event.variables:
return
self.event_stats.process(event)
self.hass.async_create_task(
self.create_update_groups_coro(event), eager_start=True
self.hass.async_create_background_task(
self.create_update_groups_coro(event),
name=f"sonos group update {self.zone_name}",
eager_start=True,
)
def create_update_groups_coro(self, event: SonosEvent | None = None) -> Coroutine: