So I’ve got a unique little script going. It works, but there’s one piece missing that I haven’t been able to quite get…
I’ve got a custom voice command that I send into an intent_script. That script calls a HA script I have set, passing a param for my voice command to that script. All that works flawlessly.
However, a part of my script is calling a custom API I have setup with the param that I passed through the voice assistant. This API is setup through a rest_command, and I’ve setup the response messages to contain text I would want the voice assistant to read back to me instead of a generic “Done” or “Success” message.
So my question: How can I grab the response message from my rest_command, pass it back from my script to the intent_script, and have that be parsed into the response message for my voice assistant? My thoughts would be:
- rest_command finishes with message in response json “Did the thing”
- the script at the end uses “STOP” and passes that variable I grabbed back from the json response to the intent_script (or is there a different way I have to do this?)
- The intent script response uses the variable it got back (can it read variables from the script response??)
Not sure if I’m going beyond what HA can do at the moment w/ the voice assistant stuff, but doesn’t hurt to ask
Any advice on how one can do this would be appreciated!