#Send Actions with HA Voice PE ?
1 messages · Page 1 of 1 (latest)
you need to expose the entities to assist and also for ease of use you can assign an alias too. you can do this either in the assist settings by going to settings>>voice assistants
adding a simple alias will allow you to match a word to a device that you will use to control it
so whats the full trigger? ex in your screenshot you have an alias back room but its a switch. would it be ..
wake word, back room?
wake word, switch back room?
wake word, toggle back room?
wake word, toggle switch back room?
what if it was a script?
is there a syntax master list for each entity type? this is very frustrating.
Create an automation, set the trigger to be sentence and define the sentence you want to speak to trigger your script. Then under actions, run your script. 🙂
If you want to run a script with inputs or other things that can vary by voice command, look into intent scripts and custom sentences.
Most people have their devices integrated as devices in home Assistant so they work natively with the on and off voice commands built in as BigBobba was pointing out.
You can also look at https://github.com/home-assistant/intents/tree/main/sentences/en to get an idea of what sentences and commands are available by default, and you can always add your own. 🙂
You can use okay Nabu, start <name script>
still trying. this is the code for just the light on one fan. type: vertical-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: perform-action
perform_action: remote.send_command
target:
device_id: d243439385d71403e0e05cc8051564a1
entity_id:
- remote.rm4_pro
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: office light
command: "on"
That's a Dashboard card, not a script
I do not have it as a script. card is using actions.
You need to move that remote.send_command into script, and expose that script to Assist (since you can't expose action, but can expose script).
Also use three "ticks" to format your code correctly (that ticks to the left of "1" on keyboard).
thanks I will give it a try
I have tried everything I can find to run the action via script or convert to a script. I have the entire fan/light in a Vert stack card each running action, It works great ! I can go in developers mode and run action as well. any pointers appreciated Pulling my hair out on this one.
Here's your script:
alias: Send command "ON"
sequence:
- action: remote.send_command
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
command: "on"
target:
entity_id: remote.rm4_pro
Add it, save, expose to Assist and use cpeech "ok nabu, start send command on" (or rename it to your like). Or you can create automation with sentence like "turn TV on" and launch this script from there.
I tried this and got nothing. is it missing device id for fan light ?
Nope. The command on rm remote works without device id. It's IR anyways.
If your button works, this should work too. Debug it
Can you describe what actually means "nothing"? What's the error? What is the script trace?
We can't see your screen, so will need more information.
I added the script and saved it - run - no error - nothing in trace. I have 4 ceiling fan / lights with command from remote captured in RM4 - there is light and fan H M L speed and fan off - different code from remote via rm4 for each
If script ran - there should be trace of it.
How did you add the script?
And does it need that device field? The device: office light?
Got it !!! Thanks for all the pointers, Solution was to copy action and paste in to script. Now to figure out how to use the action !!!
Still trying. Got all added in scripts. Can't figure how to expose scripts to assist ??
Once you make the script, go to it in the script area, hit the three dots, then you can expose it in the voice assistant area
where is script area. I created New script and saved it. I can see it in scripts.yaml ???
when I go to scripts I only see New script . none that I built
didn't have script: !include scripts.yaml in config, rebooting now
thanks Nick !!
Ah