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)
This commit is contained in:
Bas Nijholt 2020-12-19 16:33:33 +01:00
commit 4257d27dee

View file

@ -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