Wake assistant with remote button

I would like to wake my esp32 based voice assistants with a small zigbee button, but i am unable to figure out how?

Since the device does not seem to have any input button in the home assistant interface to trigger listening. I assume i need to modify the the ESP-Home yaml, and add an input button to be exposed to HA.
But that’s a bit beyond me atm.

Anyone know how to do this?
Or have other solutions?

Hello,

I use this code to force listening ( add this in switch section)

  - platform: template
    id: listen_force
    name: Listen_force
    optimistic: true
    restore_mode: ALWAYS_OFF
    on_turn_on:
      - switch.turn_off: use_wake_word
      - delay: 0.5s
      - voice_assistant.start_continuous
    on_turn_off:
      - switch.turn_on: use_wake_word

Awesome! I’ll give it a shot asap :grin:

It works! Thank you!
And that’s really close to what i want.
I’ll need to tweak it so it’s more of a one time trigger.
As is is now, it will await multiple commands in succession as long as the toggle is active. And i would prefer a single command, pr. button press.
Also I’d like to try to get it to not always reactivate the wake word when the toggle is turned off.
But instead return to whatever the previous state is.

For anyone curios on what the entire config looks like, here is my fork of the ESP-Home firmware repo including the nice addition @will35 so kindly shared.

1 Like

You could just remove the ‘continuous’ from the - voice_assistant.start_continuous, couldn’t you? So it is - voice_assistant.start. I have such a switch and it will just listen for one command.

Definitely curious about how to achieve the other things you mentioned.

You’re right !
I have a second one for Listen Once :wink:

- platform: template
    id: listen_once
    name: Listen_once
    optimistic: true
    restore_mode: ALWAYS_OFF
    on_turn_on:
      - switch.turn_off: use_wake_word
      - delay: 0.5s
      - voice_assistant.start
    on_turn_off:
      - switch.turn_on: use_wake_word
1 Like