Add template support to the Script default field

Adding template support to the Script default field would allow pre-loading the field with the current value to make it easy to edit an existing value, e.g.

script:
  update_ignore_list:
    alias: Update Ignore List
    fields:
      ignore_list:
        name: Ignore List
        description: "Sensors to ignore"
        example: "sensor.one,sensor.two"
        default: "{{ states('input_text.ignore_list')}}"
        required: true
        selector:
          text:
            multiline: true
    sequence:
    - service: input_text.set_value
      target:
        entity_id: input_text.ignore_list
      data: 
        value: "{{ ignore_list}}"

0eeca9a30d270d3dec9c326f1b90aecffaa3411e_2_597x500

Alternatively an option lo load the current value of helper entities would also be be acceptable.

FYI default is just for the UI, it’s not what is populated into the variable by default

That makes sense. It’s also OK - if it supported templates. I could then retrieve the current value, display it in the UI, edit it, and save back it to the entity.

I am trying to build custom buttons to switch sources on my TVs. I have an LG in the bedroom and a samsung in the living room. Both TVs have a different set of available sources gathered from media_player..source_list.
Currently, I have a script with fields that take Entity ID and the source name as fields. However, the source name is a selector with hard coded list of available sources.
This feature request to allow me to use templates for the Source name field, so I don’t have to hard code list of available sources, would make this so much easy.