#Triggering automations from Voice PE state changes?

1 messages ยท Page 1 of 1 (latest)

fleet knoll
#

TL;DR: How do I trigger automation when Voice PE State changes to listening?

I just got the Voice PE yesterday, pretty neat thing! Already integrated it with OpenAi and bunch of devices. I'm planning use it to replace my google nest devices and attached picture is the Livingroom setup i've made, nice huh? ๐Ÿ™‚

I have Home Assistant open on that Lenovo M10 Tablet via Fully Kiosk browser and the screensaver on the picture is a simple website I host on my own server, I want that screensaver to be disabled when the Voice PE State changes to listening. I can see the state changes in the Logbook like this, but when trying to use the state trigger in automations like this:

alias: Mycroft - Turn on tablet screen when listening
description: ""
triggers:
  - trigger: state
    entity_id:
      - assist_satellite.home_assistant_voice_XXXXXXX_assist_satellite
    from: null
    to: Listening
conditions: []
actions:
  - type: turn_off
    device_id: XXXX
    entity_id: YYYYY
    domain: switch
mode: single

I get no triggers for that automations.. What's up?

ember geyserBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

sharp lion
#

remove from: null from your automation

fleet knoll
#

Didn't help ๐Ÿ˜

#

Tried also with to: Listening and to: "Listening" but nada..

cobalt hill
#

state is listening

#

with lowercase l

fleet knoll
#

Yes! That did the trick โค๏ธ

cobalt hill
#

FYI if you want to discover/debug this in the future, go to dev tools > states:

#

this screen is realtime, so you go here, look up the entity, then wake it

#

that idle will change to "listening"

#

then you'll know the state ๐Ÿ™‚

fleet knoll
#

I checked that as well, but just me and my eyes.. โค๏ธ

cobalt hill
#

Ah, all good ๐Ÿ˜

sharp lion
#

...or use the UI to create the automation, which will populate the state labels in the UI and use the correct values in the YAML

cobalt hill
#

didn't do that for me ๐Ÿ˜…

fleet knoll
#

Ui is not showing the states for this..

#

So for future reference, here is working trigger for automation (you need to have your own device id's of course):

alias: Mycroft - Turn on tablet screen when listening
description: ""
triggers:
  - trigger: state
    entity_id:
      - assist_satellite.home_assistant_voice_XXXXXX_assist_satellite
    to: listening
conditions: []
actions:
  - type: turn_off
    device_id: XXXXXXXXXXXXXXXXXXXX
    entity_id: YYYYYYYYYYYYYYYYYYYY
    domain: switch
mode: single
sharp lion
# cobalt hill

that's because your device is unavailable for some reason

cobalt hill
#

it isn't though which is weird lol

sharp lion
cobalt hill
sharp lion
cobalt hill
#

huh weird.

#

even restarted HA and no difference

sharp lion
#

weird. i was certain everybody can see those states in the UI

fleet knoll
#

Let me restart the HA also

#

I do think i have changed the name and haven't restarted since

#

No difference.

plush dragon
sharp lion
#

We were talking about Voice PEs in this specific case. Or so i figured from the thread title

fleet knoll
#

Yup, Voice PE

muted drum
# fleet knoll Ui is not showing the states for this..

Thank you for posting this automation. Based on your automation, I was able to create two automations to lower and restore the volume of the TV when the Voice PE is listening so the voice PE doesn't continue listening to the TV dialog after a Voice PE command is given.

plush dragon
muted drum