PythonScriptsPro
PythonScriptsPro copied to clipboard
How can I use parameteres?
Hi I exec a paython file from Call service node from Node-red and added this code:
{
"file": "/config/python_scripts/unifi/unifi_led.py",
"state": "on"
}
it call and execute unifi_led.py but without parameters and when I exec the file from cmd prompt with parameters it works without problem. I have tried to call the service with fowling code but did not help: `service: python_script.exec data: file: { "file": "/config/python_scripts/unifi/unifi_led.py", "state": "on"
}` what do I do wrong?
cmd: python unifi_led.py -state on