From 2d31683f62d76270d676e4bd3f4e8ab0dcb0bb7d Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sat, 16 Dec 2023 04:36:21 -0500 Subject: [PATCH] Improve Voice Assistant handling --- supersensor.yaml | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/supersensor.yaml b/supersensor.yaml index 709b8fa..7862f94 100644 --- a/supersensor.yaml +++ b/supersensor.yaml @@ -201,22 +201,8 @@ logger: api: encryption: key: !secret api_encryption_key - on_client_disconnected: - - light.turn_on: - id: output_led - effect: flash_white - - switch.turn_off: use_wake_word on_client_connected: - # This absolute absurdity is required to prevent - # "no wake word detected" failure loops. - switch.turn_on: use_wake_word - - delay: 2s - - switch.turn_off: use_wake_word - - delay: 2s - - switch.turn_on: use_wake_word - - delay: 2s - - light.turn_off: - id: output_led ota: password: !secret ota_password @@ -267,14 +253,14 @@ voice_assistant: auto_gain: 31dBFS volume_multiplier: 4.0 id: assist - on_error: + on_client_connected: + - delay: 2s - light.turn_off: id: output_led - transition_length: 1s - - logger.log: "Voice Assistant encountered an error; restarting it" - - switch.turn_off: use_wake_word - - delay: 1s - - switch.turn_on: use_wake_word + on_client_disconnected: + - light.turn_on: + id: output_led + effect: flash_white on_wake_word_detected: - light.turn_off: id: output_led