How to get raw_input into Home Assistant

Is is possible to get Rhasspy to send raw_input to Home Assistant as a slot, or any way to access the raw input from an intent script in Home assistant. I did try raw_input (because that is what is seen in the Rhasspy log in HA) in the intent script but it doesnt appear to actually send it to the HA intent.

The reason the raw input would help is because there doesnt seem to be a way to have a wildcard slot in Rhasspy. If HA received the raw input I could still achieve something like this:

Rhasspy sentence:

[askOpenAiQuestion]
(answer this) {the_question}

Then in the HA intent script parse out “answer this” and sends the remainder of the raw_input to a URL which then queries the another API and send the answer received to Home Assistant TTS to say the answer.

So I guess I’m asking, has anyone been able to send wildcard slots or raw_input so that HA has access to them in an event or intent script?

If you use events and you use an automation with event trigger you should have:

{{trigger.event.data._intent.rawInput}}
and
{{trigger.event.data._raw_text}}

If you use intents it should also be available, but I do know the correct template to get it at the moment.

Hope it helps

1 Like

Nice, if you use {{_intent.rawInput}} in the HA intent it gives the raw text.

Thank you!!!

1 Like