Script arguments troubles

Hello. I set up wol integration, and want use one script on several devices. But have troubles with script args.
yaml:

wake_on_lan:
psexec:

switch:
  - platform: wake_on_lan
    name: "dimquea-desktop"
    mac: !secret dimquea_desktop_mac
    host: !secret dimquea_desktop_host
    turn_off:
      - service: script.desktop_remote_shutdown
        data:
          arg_ip: !secret dimquea_desktop_host
          arg_user: !secret dimquea_desktop_user
          arg_pass: !secret dimquea_desktop_password

script:
  desktop_remote_shutdown: 
    alias: "turn off"
    icon: "mdi:power"
    sequence:
      - service: psexec.exec
        data:
          encrypt: false
          host: {{ arg_ip }}
          username: {{ arg_user }}
          password: {{ arg_pass }}
          command: cmd.exe /c start /b shutdown.exe /h

After check, have this warning:

Error loading /config/configuration.yaml: invalid key: “OrderedDict([(‘arg_ip’, None)])” in “/config/conf/wol.yaml”, line 24, column 0

What i do wrong?

Put your templates between quotes, i.e.

host: '{{ arg_ip }}'
1 Like