#Send Actions with HA Voice PE ?

1 messages · Page 1 of 1 (latest)

drowsy brook
#

I am controlling my Ceiling fan / lights via RM4 Pro.
Works great with Actions and Vert stack cards.
How do I send command via Home Assist voice PE?

dry stream
#

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

wild prawn
dry stream
#

turn on back room

#

wake word first sorry

#

so "ok nabu" "turn on back room"

wild prawn
#

what if it was a script?

#

is there a syntax master list for each entity type? this is very frustrating.

crimson meadow
#

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.

foggy cargo
#

You can use okay Nabu, start <name script>

drowsy brook
#

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"
foggy cargo
#

That's a Dashboard card, not a script

drowsy brook
#

I do not have it as a script. card is using actions.

young robin
#

Also use three "ticks" to format your code correctly (that ticks to the left of "1" on keyboard).

drowsy brook
#

thanks I will give it a try

drowsy brook
#

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.

young robin
#

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.

crimson meadow
drowsy brook
young robin
young robin
drowsy brook
#

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

young robin
#

If script ran - there should be trace of it.

crimson meadow
#

How did you add the script?

#

And does it need that device field? The device: office light?

drowsy brook
#

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 !!!

drowsy brook
#

Still trying. Got all added in scripts. Can't figure how to expose scripts to assist ??

crimson meadow
#

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

drowsy brook
#

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 !!

crimson meadow
#

Ah