Hi probably something very simple - but I try now already for houres:
My script should get a list of labels (I love the new labels) and run some services with it.
Here is an example with a single service:
alias: set_sonnenschutz
fields:
labels:
selector:
label:
multiple: true
name: Label_Test
required: true
sequence:
- alias: Set tilt
service: cover.set_cover_tilt_position
target:
label_id: '{{ labels }}'
data:
tilt_position: 60
no matter what I try it gives me an error, I tried for the target: lable_id:
label_id: '{{ labels }}'
label_id: '{{ labels | string }}'
label_id: '{{ labels | list}}'
label_id: '{{ labels | join('', '') }}'
I call it as (created in the UI / dev tools / services) :
service: script.1714122790820
data:
labels:
- rechts
- vorne
And always get errors like:
with this additional but wrong “list dash”
target:
label_id:
- - rechts
- vorne
Hard coding it like:
service: cover.set_cover_tilt_position
target:
label_id:
- rechts
- vorne
data:
tilt_position: 60
works fine.