Optimize Sonos favorites updates (#43516)

pull/43538/head
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
1 changed files with 3 additions and 2 deletions

View File

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