From 9e22e70d63ad30347611c906de52c04ea776efea Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Tue, 30 Aug 2022 09:45:05 -0700 Subject: [PATCH 1/2] Take care of edge case where no area_id or entity_id in service_data --- custom_components/adaptive_lighting/switch.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 00555ef0..5eb29a9a 100755 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -1291,6 +1291,11 @@ async def turn_on_off_event_listener(self, event: Event) -> None: _LOGGER.debug( "Found entity_ids '%s' for area_id '%s'", entity_ids, area_id ) + else: + _LOGGER.debug( + "No entity_ids or area_ids found in service_data: %s", service_data + ) + return if not any(eid in self.lights for eid in entity_ids): return From 52220b0328dbaad380a719423a80c39be28d6493 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Tue, 30 Aug 2022 09:46:13 -0700 Subject: [PATCH 2/2] Bump version to 1.0.18 --- custom_components/adaptive_lighting/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/adaptive_lighting/manifest.json b/custom_components/adaptive_lighting/manifest.json index c6ac3cd6..4ac645d0 100644 --- a/custom_components/adaptive_lighting/manifest.json +++ b/custom_components/adaptive_lighting/manifest.json @@ -6,7 +6,7 @@ "config_flow": true, "dependencies": [], "codeowners": ["@basnijholt", "@RubenKelevra"], - "version": "1.0.17", + "version": "1.0.18", "requirements": [], "iot_class": "calculated" }