mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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"]}
|
||||
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_PROGRESS:
|
||||
data_to_send = {
|
||||
"tts_start_streaming": bool(
|
||||
event.data and event.data.get("tts_start_streaming")
|
||||
),
|
||||
"tts_start_streaming": "1"
|
||||
if (event.data and event.data.get("tts_start_streaming"))
|
||||
else "0",
|
||||
}
|
||||
elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_END:
|
||||
assert event.data is not None
|
||||
|
@ -243,12 +243,12 @@ async def test_pipeline_api_audio(
|
||||
event_callback(
|
||||
PipelineEvent(
|
||||
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 == (
|
||||
VoiceAssistantEventType.VOICE_ASSISTANT_INTENT_PROGRESS,
|
||||
{"tts_start_streaming": True},
|
||||
{"tts_start_streaming": "1"},
|
||||
)
|
||||
|
||||
event_callback(
|
||||
|
Loading…
x
Reference in New Issue
Block a user