How to have script accept entity_id the same way as most service calls?

I want to use a script to wrap a light.turn_on service call with a bunch of default params prepopulated so I don’t have to pass the same thing everywhere (e.g defaulting a color). I use both forms of entity_id: <string> and entity_id: <list> across my config and am wondering the best way to have the script recognize either format in the data_template section?

you should be able to put the entity_ids into the template results as a comma separated list:

data_template: >
  {% if something %}
    entity_id.a, entity_id.b, entity_id.c
  {% endif %}

Yeah I was trying to avoid changing all my entity_id fields and actually prefer the yaml list format, but this is a decent alternative. Thanks!

Ended up just using a python_script instead; works great and much more concise!