Fix Sonos restore calls (#51565)

This commit is contained in:
jjlawren 2021-06-07 04:46:56 -05:00 committed by GitHub
parent ae83191121
commit 85ce679c64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -765,7 +765,7 @@ class SonosSpeaker:
"""Pause all current coordinators and restore groups."""
for speaker in (s for s in speakers if s.is_coordinator):
if speaker.media.playback_status == SONOS_STATE_PLAYING:
hass.async_create_task(speaker.soco.pause())
speaker.soco.pause()
groups = []