Fix updating sensor on unlinked Plex server (#58418)
This commit is contained in:
parent
f2a5c4602e
commit
2d6fa5c453
1 changed files with 1 additions and 1 deletions
|
@ -454,7 +454,7 @@ class PlexServer:
|
|||
_LOGGER.debug("Photo session detected, skipping: %s", session)
|
||||
continue
|
||||
|
||||
session_username = session.usernames[0]
|
||||
session_username = next(iter(session.usernames), None)
|
||||
for player in session.players:
|
||||
unique_id = f"{self.machine_identifier}:{player.machineIdentifier}"
|
||||
if unique_id not in self.active_sessions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue