Skip to content

Commit

Permalink
Merge pull request #63 from Garulf/fix-light-effects-none
Browse files Browse the repository at this point in the history
Handle lights with no effects attribute
  • Loading branch information
Garulf authored Jun 27, 2024
2 parents 0bfb5fb + e41d713 commit 0f62ce8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "HA-Commander",
"Description": "Search, and interact with Home Assistant using Wox or Flow Launcher.",
"Author": "Garulf",
"Version": "5.1.1",
"Version": "5.1.2",
"Language": "python",
"Website": "https://github.com/Garulf/HA-Commander",
"IcoPath": "icons\\home-assistant.png",
Expand Down
2 changes: 1 addition & 1 deletion plugin/homeassistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def __init__(self, client: Client, entity: dict) -> None:
getattr(self, f"{color}").__doc__ = f"Set light color to {color}."
getattr(self, f"{color}").icon = "palette"
getattr(self, f"{color}").score = 0
for effect in self.attributes.get("effect_list", []):
for effect in self.attributes.get("effect_list", []) or []:
setattr(self, f"{effect}", partial(self.turn_on, effect=effect))
getattr(self, f"{effect}").name = effect.title()
getattr(
Expand Down

0 comments on commit 0f62ce8

Please sign in to comment.