Script in "restart" mode and passing variables

Hi,

I was coding a generic script for turn off some lights, simple script like this:

timer_off_luces:
  alias: "Apaga las luces automaticamente cuando no hay movimiento"
  mode: restart
  fields:
    group_motion:
      description: "Grupo de sensores de movimiento"
      example: motion_sensors_plantabaja
    switch:
      description: "Switch a apagar"
      example: pasillo_switch
    timeout:
      description: "Timeout para apagar en caso de que no se apague automaticamente"
      example: "00:03:00"

  variables:
    group_motion_c: "{{ 'group.{}'.format(group_motion) }}"
    switch_c: "{{ 'switch.{}'.format(switch) }}"

  sequence:
    - wait_for_trigger:
        platform: template
        value_template: "{{ is_state(group_motion_c, 'off') }}"
      timeout: "{{ timeout }}"
      continue_on_timeout: true
    - service: homeassistant.turn_off
      data_template:
        entity_id: "{{ switch_c }}"

I’m using mode=restart because I want to restart the script (for reset the timeout) but I’m running multiple instances at the same time for this script using differences parameters (for different entities) … and I’m not sure what will do HA when is running the script in “restart” mode and with different parameters.

Thanks!

I’ve the exact same questions. Any pointers anyone?