From 5356a10609aa7c74b6852e8dd7f424a78ebf0e0d Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Thu, 27 Jun 2024 03:54:23 -0400 Subject: [PATCH 1/2] Handle lights with no effects attribute --- plugin/homeassistant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( From e41d713d7e46b7b71e3d2dae247079d174ff47ee Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Thu, 27 Jun 2024 03:56:54 -0400 Subject: [PATCH 2/2] Bump from 5.1.1 to 5.1.2 --- plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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",