diff --git a/m5stack-atom-echo/m5stack-atom-echo.yaml b/m5stack-atom-echo/m5stack-atom-echo.yaml index 095638b..5087f8f 100644 --- a/m5stack-atom-echo/m5stack-atom-echo.yaml +++ b/m5stack-atom-echo/m5stack-atom-echo.yaml @@ -1,7 +1,6 @@ substitutions: name: m5stack-atom-echo friendly_name: M5Stack Atom Echo - micro_wake_word_model: okay_nabu # alexa, hey_jarvis, hey_mycroft are also supported esphome: name: ${name} @@ -53,6 +52,7 @@ speaker: voice_assistant: id: va microphone: echo_microphone + # micro_wake_word: mww #not yet upstreamed from home-assistant-voice-pe speaker: echo_speaker noise_suppression_level: 2 auto_gain: 31dBFS @@ -279,6 +279,32 @@ switch: - switch.turn_off: timer_ringing select: + - platform: template + name: "Active wake word" + icon: "mdi:bullhorn" + entity_category: config + options: + - "OK Nabu" + - "Hey Jarvis" + - "Hey Mycroft" + optimistic: true + restore_value: true + on_value: + then: + - lambda: |- + if (x == "OK Nabu") { + id(okay_nabu).enable(); + id(hey_mycroft).disable(); + id(hey_jarvis).disable(); + } else if (x == "Hey Mycroft") { + id(okay_nabu).disable(); + id(hey_mycroft).enable(); + id(hey_jarvis).disable(); + } else if (x == "Hey Jarvis") { + id(okay_nabu).disable(); + id(hey_mycroft).disable(); + id(hey_jarvis).enable(); + } - platform: template entity_category: config name: Wake word engine location @@ -323,9 +349,15 @@ file: file: https://github.com/esphome/wake-word-voice-assistants/raw/main/sounds/timer_finished.wav micro_wake_word: + # id: mww # not yet supported on_wake_word_detected: - voice_assistant.start: wake_word: !lambda return wake_word; vad: models: - - model: ${micro_wake_word_model} + - model: okay_nabu + id: okay_nabu + - model: hey_jarvis + id: hey_jarvis + - model: hey_mycroft + id: hey_mycroft