mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 05:35:11 +02:00
Only send ESPHome intent progress when necessary (#147458)
* Only send intent progress when necessary * cover * Fix logic --------- Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
@@ -284,11 +284,15 @@ class EsphomeAssistSatellite(
|
||||
assert event.data is not None
|
||||
data_to_send = {"text": event.data["stt_output"]["text"]}
|
||||
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_PROGRESS:
|
||||
data_to_send = {
|
||||
"tts_start_streaming": "1"
|
||||
if (event.data and event.data.get("tts_start_streaming"))
|
||||
else "0",
|
||||
}
|
||||
if (
|
||||
not event.data
|
||||
or ("tts_start_streaming" not in event.data)
|
||||
or (not event.data["tts_start_streaming"])
|
||||
):
|
||||
# ESPHome only needs to know if early TTS streaming is available
|
||||
return
|
||||
|
||||
data_to_send = {"tts_start_streaming": "1"}
|
||||
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_END:
|
||||
assert event.data is not None
|
||||
data_to_send = {
|
||||
|
Reference in New Issue
Block a user