PythonScriptsPro icon indicating copy to clipboard operation
PythonScriptsPro copied to clipboard

How to pass a variable to the script?

Open shelly20222 opened this issue 2 months ago • 0 comments

Image

I don't know how to give a entity to the script. In my case, it is a IP Adress which I want to block in Fritzbox.

e.g. fritzblock.py {{ states(‘sensor.zu_sperrende_ip‘) }}

How can I access the variable in script?

e.g. Import sys Ip = str(sys.argv[1])

shelly20222 avatar Nov 17 '25 15:11 shelly20222