mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Fix updating sensor on unlinked Plex server (#58418)
This commit is contained in:
@@ -454,7 +454,7 @@ class PlexServer:
|
|||||||
_LOGGER.debug("Photo session detected, skipping: %s", session)
|
_LOGGER.debug("Photo session detected, skipping: %s", session)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
session_username = session.usernames[0]
|
session_username = next(iter(session.usernames), None)
|
||||||
for player in session.players:
|
for player in session.players:
|
||||||
unique_id = f"{self.machine_identifier}:{player.machineIdentifier}"
|
unique_id = f"{self.machine_identifier}:{player.machineIdentifier}"
|
||||||
if unique_id not in self.active_sessions:
|
if unique_id not in self.active_sessions:
|
||||||
|
Reference in New Issue
Block a user