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:
@ -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:
|
||||
|
Reference in New Issue
Block a user