Shell command works, but script does not

I made a python code that I run over shell command like this:

shell_command:
  tv_power: "python3 chuangmiir.py {{ states.device_tracker.mi_remote.attributes.ip }}"

The shell command works when I run it through Developer tools Services, but I would like to add it to lovelace view. So I created the script like this in scripts.yaml

tv_power:
  icon: mdi:power
  sequence:
  - service: shell_command.tv_power

But running this script through lovelace or through Developer tools or throuch Configuration Scripts does nothing. How can I make this work?

Any errors in the log when you go to run the script?

No, nothing happens.

Shell commands are services, you don’t have to make a script, just add it directly as a service to a lovelace button tap action.

Thanks, that worked. Didn’t know that I could add service calls to the button action.

As for the scripts, I guess I don’t need it now, but strange how it does not work.