Look at how the entity_id
option in these examples is not fussy:
service: light.turn
entity_id:
- light.kitchen
- light.bathroom
service: light.turn
entity_id: light.kitchen, light.bathroom
In the first example, entity_id
is assigned a list
['light.kitchen', 'light.bedroom']
In the second example, entity_id
is assigned a string
light.kitchen, light.bedroom
Both examples work and all the magic happens internally without any complaining that entity_id
was not given a list.
More of this easy-going behavior would be appreciated. Compare it to the fussiness of options like rgb_color
. It requires a list and accepts nothing else.
That’s not just inconvenient but downright challenging if you want to template it. Templates can only produce a string. So you’re obliged to template each color value (i.e. three templates, one for red, a second for green, and a third for blue). Most users only discover this after posting a question in the forum about why their single template fails to work with rgb_color
.
rgb_color
ought to accept either a list or a comma-delimited string like this:
rgb_color: '125, 80, 200'
A single template can easily crank out a comma-delimited string.