Optimize Sonos favorites updates (#43516)

This commit is contained in:
Anders Melchiorsen 2020-11-22 14:04:46 +01:00 committed by GitHub
parent a633341dc9
commit 62da64867c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -947,6 +947,7 @@ class SonosEntity(MediaPlayerEntity):
def update_content(self, event=None): def update_content(self, event=None):
"""Update information about available content.""" """Update information about available content."""
if event and "favorites_update_id" in event.variables:
self._set_favorites() self._set_favorites()
self.schedule_update_ha_state() self.schedule_update_ha_state()