Cleanup Sonos grouping event callback method (#54542)

pull/54571/head
jjlawren 2021-08-12 15:01:34 -05:00 committed by GitHub
parent 81e1c44592
commit 084737dd01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -636,8 +636,8 @@ class SonosSpeaker:
def async_update_groups(self, event: SonosEvent) -> None:
"""Handle callback for topology change event."""
if not hasattr(event, "zone_player_uui_ds_in_group"):
return None
self.hass.async_add_job(self.create_update_groups_coro(event))
return
self.hass.async_create_task(self.create_update_groups_coro(event))
def create_update_groups_coro(self, event: SonosEvent | None = None) -> Coroutine:
"""Handle callback for topology change event."""