HTTP GET - comman_line switch and variable

Hi,

Iam using HTTP GET commands to play various mp3`s on remote device, which is listening for HTTP GET and argument as mp3 file. Now i create for every mp3 its own custom switch with shell command. But this is overkill for sure. I would like to for example create one switch with http get, and use diffrent mp3 file like variable when creating automation. Is this somehos possible ?
Cuurent config: the argument1 should be passed like variable in every automation diffrent varibale.

switch 6:
  - platform: command_line
    switches:
      horn:
       command_on: "/usr/bin/curl -g 'http://192.168.24.201:88/play.php?argument1=horn.mp3'"
       command_off: "/usr/bin/curl -g 'http://192.168.24.201:88/play.php?argument1=horn.mp3'"

Thank you for your help

The command line switch does not accept templates. However the shell command does:

So you could do something like this:

shell_command:
  play_mp3: "/usr/bin/curl -g 'http://192.168.24.201:88/play.php?argument1={{ filename }}'"

To use this you could set up Lovelace buttons with the following tap action:

tap_action:
  action: call-service
  service: shell_command.play_mp3
  service_data:
    filename: horn.mp3

You’re not limited to buttons either. See:

You could use album artwork in a picture card for example.

Thank you very much for such quick replay, exactly what I was looking for.