It created a list whose first item is the list you passed to it. In other words, regardless of what you pass to it (a string, list, or even dictionary), it simply becomes the first item of a list.
I’m not sure if that’s intentional or a bug but it makes passing lists to label_id ineffective. It seems like a bug so I suggest you report it as an Issue in Home Assistant’s GitHub Core repository.
@mhoff did you ever report this as a bug? I do have the same issue and would open a bug if not already present.
Here is a minimum working example for reference including the trace:
alias: Cover open / close (Duplicate)
sequence:
- data: {}
action: cover.close_cover
target:
device_id: '{{ f_cover_device }}'
fields:
f_cover_device:
selector:
device:
multiple: true
required: true
default: # make sure to add two devices here - can be anything I used a covers as example
- c042fda57770a7f83072e84315a5357f
- 35f58faa396ee578fba25b18413c0304
description: ''
icon: mdi:window-shutter
Trace Step details
Executed: January 5, 2025 at 11:55:51
Error: template value should be a string @ data['device_id'][0]
Result:
params:
domain: cover
service: close_cover
service_data: {}
target:
device_id:
- - c042fda57770a7f83072e84315a5357f
- 35f58faa396ee578fba25b18413c0304
running_script: false