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

Fix clearing of ZoneGroupState attribute cache
This commit is contained in:
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

View file

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