Various light test improvements (#34131)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-04-13 15:33:04 +02:00
1 parent 4bcceb4078
commit 6d24a65313
7 files changed
+418 -259

No files matched your search

+5 -5
View File
@@ -191,11 +191,11 @@ async def async_setup(hass, config):
def preprocess_data(data):
"""Preprocess the service data."""
base = {}
for entity_field in cv.ENTITY_SERVICE_FIELDS:
if entity_field in data:
base[entity_field] = data.pop(entity_field)
base = {
entity_field: data.pop(entity_field)
for entity_field in cv.ENTITY_SERVICE_FIELDS
if entity_field in data
}
preprocess_turn_on_alternatives(data)
turn_lights_off, off_params = preprocess_turn_off(data)