Skip to content

Commit

Permalink
fix: mediaplayer attribute error
Browse files Browse the repository at this point in the history
  • Loading branch information
Gh0stExp10it committed Jan 8, 2025
1 parent f04cc03 commit ad75ef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/homeassistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def __init__(self, client: Client, entity: dict) -> None:
getattr(self, source).__doc__ = 'Set Source to "{}"'.format(source)
getattr(self, source).icon = "radiobox-blank"
current_source = self.attributes.get("source")
if current_source:
if current_source and current_source in self.attributes.get("source_list", []):
getattr(self, current_source).icon = "radiobox-marked"
getattr(self, current_source).__doc__ = "Currently selected Source."

Expand Down

0 comments on commit ad75ef4

Please sign in to comment.