From 65f897793d184231fa41031b956d73c1ad42775d Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Fri, 20 Jun 2025 14:18:03 -0500 Subject: [PATCH] Use string instead of boolean for voice event (#147244) Use string instead of bool --- homeassistant/components/esphome/assist_satellite.py | 6 +++--- tests/components/esphome/test_assist_satellite.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/esphome/assist_satellite.py b/homeassistant/components/esphome/assist_satellite.py index fdeadd7feb1..f6367165400 100644 --- a/homeassistant/components/esphome/assist_satellite.py +++ b/homeassistant/components/esphome/assist_satellite.py @@ -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 diff --git a/tests/components/esphome/test_assist_satellite.py b/tests/components/esphome/test_assist_satellite.py index 71977f0285c..3acdc1f2029 100644 --- a/tests/components/esphome/test_assist_satellite.py +++ b/tests/components/esphome/test_assist_satellite.py @@ -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(