Closed r1ch closed 2 years ago
Great library; thank you! - I wanted to share some "oddness" that I've worked around - in case it's useful to others:
tl;dr
For any script, try using
domain: script service: turn_on service_data: '{"entity_id":"script.NAMEOFSCRIPTHERE"}'
I get the error "Unable to perform request: Check [url], [body], ...."
I'm using a script so I have (had...)
domain: script service: name_of_script service_data: '{}'
What is intriguing is that I can run the script alone, but if I get Dasshio to invoke it - it doesn't complete
Now, you can also (if you get a long lived token) excute the script how Dasshio will at your command line
curl -X POST -H "Authorization: Bearer long_lived_token" -H "Content-Type: application/json" http://homeassistant.local:8123/api/services/script/name_of_script
This hangs the duration for the delay in my script (I find that surprising, but... whatever!) Dasshio doesn't like that.
OK - so what to do - scriptception
curl -X POST -H "Authorization: Bearer long_lived_token" -H "Content-Type: application/json" http://homeassistant.local:8123/api/services/script/turn_on -d '{"entity_id":"script.name_of_script"}'
This asks to run a script very slightly less directly - but returns immediately Dasshio is happy. We are happy.
So great - how to turn that back into the config
Make sure you're using script.NAMEOFSCRIPT
Updated readme as a PR in case you're interested https://github.com/danimtb/dasshio/pull/107
Thank you so much! You saved my day.
Great library; thank you! - I wanted to share some "oddness" that I've worked around - in case it's useful to others:
tl;dr
For any script, try using
I get the error "Unable to perform request: Check [url], [body], ...."
I'm using a script so I have (had...)
What is intriguing is that I can run the script alone, but if I get Dasshio to invoke it - it doesn't complete
Now, you can also (if you get a long lived token) excute the script how Dasshio will at your command line
This hangs the duration for the delay in my script (I find that surprising, but... whatever!) Dasshio doesn't like that.
OK - so what to do - scriptception
This asks to run a script very slightly less directly - but returns immediately Dasshio is happy. We are happy.
So great - how to turn that back into the config
Make sure you're using script.NAMEOFSCRIPT