diff --git a/plugin.json b/plugin.json index 1ff747d..90237a4 100644 --- a/plugin.json +++ b/plugin.json @@ -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", diff --git a/plugin/homeassistant.py b/plugin/homeassistant.py index c7ffa39..273d570 100644 --- a/plugin/homeassistant.py +++ b/plugin/homeassistant.py @@ -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(