How to set the script name with the template variable to input_text?

Hi All!
I am trying to send the script name (actually entity_id) to the input_text helper, but cannot identify which variable inside the script might contain this information or how to do it in non-variable way. I have a lot of scripts and I expect input_text to have the entity_id of the last script performed. Something like this which is not working:

      "aircon_off":
          sequence:        
            - service: remote.send_command
              target:
                entity_id: remote.broadlink_rm4pro_lr_remote
              data:
                command:
                - b64:(......................................)
            - service: input_text.set_value
              target:
                entity_id: input_text.ac_on_latest_mode_text
              data:
                value: "{{ script.entity_id }}"

Hardcoding entity_id name to the each script sequence is somewhat tedious, hopefully there is more elegant way to do it.

Thanks for suggestions.