I have the following script that allows for multiple areas to be passed:
service: script.climate_reset
data:
room:
- wohnzimmer
- arbeitzimmer
- kinderzimmer
The script accepts that field
fields:
room:
description: Raum
required: true
selector:
area:
entity:
domain: climate
multiple: true
And passes this on to another script
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
area_id: "{{ room }}"
So this looks like it should work. But now the script errors out because the arguments to set_hvac_mode
are wrong. And it seems like they are templated out wrong. The trace shows the following:
params:
domain: climate
service: set_hvac_mode
service_data:
hvac_mode: auto
area_id:
- - wohnzimmer
- arbeitzimmer
- kinderzimmer
target:
area_id:
- - wohnzimmer
- arbeitzimmer
- kinderzimmer
I also tried passing {{ room | list }}
but this doesn’t work either. How can I make it that the argument to area_id
is interpreted as array?