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:
parent
7239706c35
commit
b52c980268
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user