From b52c980268c86ca8d0d5f26cd9757a87874c7960 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 25 Feb 2025 02:13:05 -0500 Subject: [PATCH] Improve STT response handling Newer versions of HASS provide different error messages than just the previous one, so match any that begin with Sorry for errors. Also log the response (INFO level) so we can see it. --- supersensor.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/supersensor.yaml b/supersensor.yaml index 53d8939..8cbeee5 100644 --- a/supersensor.yaml +++ b/supersensor.yaml @@ -383,7 +383,9 @@ voice_assistant: on_tts_start: - if: condition: - lambda: return x == "Sorry, I couldn't understand that"; + - lambda: |- + ESP_LOGI("tts_response", "%s", x.c_str()); + return x.rfind("Sorry", 0) == 0; then: - logger.log: "Command failed!" - light.turn_on: