diff --git a/homeassistant/components/sonos/manifest.json b/homeassistant/components/sonos/manifest.json index 854e4ef5706..68e363d3635 100644 --- a/homeassistant/components/sonos/manifest.json +++ b/homeassistant/components/sonos/manifest.json @@ -4,7 +4,7 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/components/sonos", "requirements": [ - "pysonos==0.0.19" + "pysonos==0.0.20" ], "dependencies": [], "ssdp": { diff --git a/homeassistant/components/sonos/media_player.py b/homeassistant/components/sonos/media_player.py index 66888c59e00..6e69181e72f 100644 --- a/homeassistant/components/sonos/media_player.py +++ b/homeassistant/components/sonos/media_player.py @@ -371,9 +371,15 @@ class SonosEntity(MediaPlayerDevice): def _set_favorites(self): """Set available favorites.""" - favorites = self.soco.music_library.get_sonos_favorites() - # Exclude favorites that are non-playable due to no linked resources - self._favorites = [f for f in favorites if f.reference.resources] + self._favorites = [] + for fav in self.soco.music_library.get_sonos_favorites(): + try: + # Exclude non-playable favorites with no linked resources + if fav.reference.resources: + self._favorites.append(fav) + except SoCoException as ex: + # Skip unknown types + _LOGGER.error("Unhandled favorite '%s': %s", fav.title, ex) def _radio_artwork(self, url): """Return the private URL with artwork for a radio stream.""" diff --git a/requirements_all.txt b/requirements_all.txt index 9449322798e..b0a034b36a1 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1378,7 +1378,7 @@ pysmarty==0.8 pysnmp==4.4.9 # homeassistant.components.sonos -pysonos==0.0.19 +pysonos==0.0.20 # homeassistant.components.spc pyspcwebgw==0.4.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index a3458e091b0..6898490fea4 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -298,7 +298,7 @@ pysmartapp==0.3.2 pysmartthings==0.6.9 # homeassistant.components.sonos -pysonos==0.0.19 +pysonos==0.0.20 # homeassistant.components.spc pyspcwebgw==0.4.0