Hi folks,
Is there a way to pass an array to a script. The following example returns an error
Automation :
- alias: test switch
trigger:
- platform: state
entity_id: input_boolean.test
to: 'on'
action:
- service: script.adjust_light
data:
variables:
list_ids:
- light.office
- light.livingroom
Script:
adjust_light:
sequence:
- service: light.turn_on
data_template:
entity_id: '{{ list_ids }}'
Error:
Invalid service data for light.turn_on: Entity ID ['light.office' is an invalid entity id for dictionary value @ data['entity_id']. Got "['light.office', 'light.livingroom']"