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?