Fix clearing of Sonos library cache during regrouping (#74085)

Fix clearing of ZoneGroupState attribute cache
pull/72830/head^2
jjlawren 2022-06-28 02:51:33 -05:00 committed by GitHub
parent cb46bb5bfa
commit 800bae68a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1084,8 +1084,8 @@ class SonosSpeaker:
except asyncio.TimeoutError: except asyncio.TimeoutError:
_LOGGER.warning("Timeout waiting for target groups %s", groups) _LOGGER.warning("Timeout waiting for target groups %s", groups)
for speaker in hass.data[DATA_SONOS].discovered.values(): any_speaker = next(iter(hass.data[DATA_SONOS].discovered.values()))
speaker.soco._zgs_cache.clear() # pylint: disable=protected-access any_speaker.soco.zone_group_state.clear_cache()
# #
# Media and playback state handlers # Media and playback state handlers