mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Use string instead of boolean for voice event (#147244)
Use string instead of bool
This commit is contained in:
parent
435c08685d
commit
65f897793d
@ -285,9 +285,9 @@ class EsphomeAssistSatellite(
|
|||||||
data_to_send = {"text": event.data["stt_output"]["text"]}
|
data_to_send = {"text": event.data["stt_output"]["text"]}
|
||||||
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_PROGRESS:
|
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_PROGRESS:
|
||||||
data_to_send = {
|
data_to_send = {
|
||||||
"tts_start_streaming": bool(
|
"tts_start_streaming": "1"
|
||||||
event.data and event.data.get("tts_start_streaming")
|
if (event.data and event.data.get("tts_start_streaming"))
|
||||||
),
|
else "0",
|
||||||
}
|
}
|
||||||
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_END:
|
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_END:
|
||||||
assert event.data is not None
|
assert event.data is not None
|
||||||
|
@ -243,12 +243,12 @@ async def test_pipeline_api_audio(
|
|||||||
event_callback(
|
event_callback(
|
||||||
PipelineEvent(
|
PipelineEvent(
|
||||||
type=PipelineEventType.INTENT_PROGRESS,
|
type=PipelineEventType.INTENT_PROGRESS,
|
||||||
data={"tts_start_streaming": True},
|
data={"tts_start_streaming": "1"},
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
assert mock_client.send_voice_assistant_event.call_args_list[-1].args == (
|
assert mock_client.send_voice_assistant_event.call_args_list[-1].args == (
|
||||||
VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_PROGRESS,
|
VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_PROGRESS,
|
||||||
{"tts_start_streaming": True},
|
{"tts_start_streaming": "1"},
|
||||||
)
|
)
|
||||||
|
|
||||||
event_callback(
|
event_callback(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user