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