From 4257d27deeffeb2f9be9acb287f23c5be6c2a296 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sat, 19 Dec 2020 16:33:33 +0100 Subject: [PATCH] deal with 'light.turn_on' with multiple lights, which appear as csv list Solves the bug reported in #39 (https://github.com/basnijholt/adaptive-lighting/issues/39) --- custom_components/adaptive_lighting/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 2575a3e5..597928f3 100755 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -1175,7 +1175,7 @@ class TurnOnOffListener: service = event.data[ATTR_SERVICE] service_data = event.data[ATTR_SERVICE_DATA] - entity_ids = cv.ensure_list(service_data[ATTR_ENTITY_ID]) + entity_ids = cv.ensure_list_csv(service_data[ATTR_ENTITY_ID]) if not any(eid in self.lights for eid in entity_ids): return