From a6605fd8ed573c0d89408ec241fc6f8ba37765ea Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Sat, 3 Aug 2024 19:23:25 +0200 Subject: [PATCH] Added stuff from 2 PRs https://github.com/tetele/onju-voice-satellite/pull/62 Completely https://github.com/tetele/onju-voice-satellite/pull/67 Most was already in my config, but the delay removing was taken over of it. --- esphome/onju-voice-microwakeword.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/esphome/onju-voice-microwakeword.yaml b/esphome/onju-voice-microwakeword.yaml index 3a9e431..100f5aa 100644 --- a/esphome/onju-voice-microwakeword.yaml +++ b/esphome/onju-voice-microwakeword.yaml @@ -52,6 +52,9 @@ esphome: blue: 0% - delay: 1s - script.execute: reset_led + - media_player.volume_set: + id: onju_out + volume: !lambda "return id(volume_percent);" dashboard_import: package_import_url: github://dreimer1986/onju-voice-satellite/esphome/onju-voice-microwakeword.yaml@main @@ -121,6 +124,10 @@ globals: - id: notification type: bool restore_value: false + - id: volume_percent + type: float + initial_value: "0.5" + restore_value: yes interval: - interval: 1s @@ -196,6 +203,7 @@ media_player: } } old_volume = new_volume; + id(volume_percent) = old_volume; micro_wake_word: on_wake_word_detected: @@ -241,7 +249,7 @@ voice_assistant: green: 100% effect: speaking on_end: - - delay: 200ms +# - delay: 200ms - wait_until: not: media_player.is_playing: onju_out @@ -252,7 +260,7 @@ voice_assistant: - switch.is_on: use_wake_word - binary_sensor.is_off: mute_switch then: - - delay: 200ms +# - delay: 200ms - micro_wake_word.start on_client_connected: - if: