Replies: 1 comment
-
Sorry, I'm not familiar with how HA scripts take parameters. Without using pyscript, how would you use a service call from the UI to execute the script? In particular, what parameters would you use there? Knowing that, it should then be easy to construct the right |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
from my pyscript I would like to run a HA script passing a parameter called "variable1".
I cannot find the correct syntax: any help?
I tried these:
service.call("script", "turn_on", entity_id="script.aaa_test", variable1 = "aaa")
service.call("script", "turn_on", entity_id="script.aaa_test", variables = [variable1 = "aaa"])
but they are not working.
The first returns an error: MultipleInvalid: extra keys not allowed @ data['carta']
The second returns and error: SyntaxError: expression cannot contain assignment, perhaps you meant "=="?
Any help is appreciated, thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions