mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 04:05:06 +02:00
Fix logic reversal in sonos update_media_radio (#48900)
This commit is contained in:
@@ -718,8 +718,11 @@ class SonosEntity(MediaPlayerEntity):
|
|||||||
) and (
|
) and (
|
||||||
self.state != STATE_PLAYING
|
self.state != STATE_PLAYING
|
||||||
or self.soco.music_source_from_uri(self._media_title) == MUSIC_SRC_RADIO
|
or self.soco.music_source_from_uri(self._media_title) == MUSIC_SRC_RADIO
|
||||||
and self._uri is not None
|
or (
|
||||||
and self._media_title in self._uri # type: ignore[operator]
|
isinstance(self._media_title, str)
|
||||||
|
and isinstance(self._uri, str)
|
||||||
|
and self._media_title in self._uri
|
||||||
|
)
|
||||||
):
|
):
|
||||||
self._media_title = uri_meta_data.title
|
self._media_title = uri_meta_data.title
|
||||||
except (TypeError, KeyError, AttributeError):
|
except (TypeError, KeyError, AttributeError):
|
||||||
|
Reference in New Issue
Block a user