Using HA the Voice PE to start a script

I want to be able to issue a voice request to the voice PE “ ok Nabu - do command x”, capture the phrase and pass it into a script. I don’t want to use an LLM at the outset because I use a cache to check if the phrase was previously successful. If it’s not successful, THEN I call the LLM to process the phrase and then process the action. (And update the cache for next time).

I can wait for a trigger on the assist.satellite sensor but I then need to capture the text of the spoken phrase.

Any thoughts?
Thanks in advance.

Create a voice automation and use a wildcard to get the value of x. Then use it for any purpose.

Thanks for this - sorry, I didn’t quite get the explanation correct. I want to capture the whole phrase for example
Ok nabu please can you switch off my lights

So I want to pass that complete phrase to my script. (Please …. my lights)

How would that work?

So you want to receive a value outside the pipeline.
You’ll need to change the satellite configuration in Esphome and add either a text sensor or an event that will be transmitted to HA.
examle

1 Like