diff --git a/homeassistant/components/plex/media_player.py b/homeassistant/components/plex/media_player.py index 650ed2c89b0..f9c40f1edc3 100644 --- a/homeassistant/components/plex/media_player.py +++ b/homeassistant/components/plex/media_player.py @@ -492,6 +492,10 @@ class PlexMediaPlayer(MediaPlayerEntity): "Client is not currently accepting playback controls: %s", self.name ) return + if not self.plex_server.has_token: + _LOGGER.warning( + "Plex integration configured without a token, playback may fail" + ) src = json.loads(media_id) if isinstance(src, int): diff --git a/homeassistant/components/plex/server.py b/homeassistant/components/plex/server.py index 4dcdda044eb..dc05a727fee 100644 --- a/homeassistant/components/plex/server.py +++ b/homeassistant/components/plex/server.py @@ -537,6 +537,11 @@ class PlexServer: """Return the plexapi PlexServer instance.""" return self._plex_server + @property + def has_token(self): + """Return if a token is used to connect to this Plex server.""" + return self._token is not None + @property def accounts(self): """Return accounts associated with the Plex server."""