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.
This commit is contained in:
Joshua Boniface 2025-02-25 02:13:05 -05:00
parent 7239706c35
commit b52c980268

View File

@ -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: