Skip to content

Commit 7908d35

Browse files
authored
Merge pull request #68 from Gh0stExp10it/fix/mediaplayer-attribute-error
2 parents f04cc03 + ad75ef4 commit 7908d35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/homeassistant.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def __init__(self, client: Client, entity: dict) -> None:
324324
getattr(self, source).__doc__ = 'Set Source to "{}"'.format(source)
325325
getattr(self, source).icon = "radiobox-blank"
326326
current_source = self.attributes.get("source")
327-
if current_source:
327+
if current_source and current_source in self.attributes.get("source_list", []):
328328
getattr(self, current_source).icon = "radiobox-marked"
329329
getattr(self, current_source).__doc__ = "Currently selected Source."
330330

0 commit comments

Comments
 (0)