Various light test improvements (#34131)
This commit is contained in:
1 parent
4bcceb4078
commit
6d24a65313
7 files changed
+418
-259
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user