Fix manual stopping of the voice assistant pipeline (#101351)

This commit is contained in:
Jesse Hills 2023-10-04 12:15:56 +13:00 committed by GitHub
parent e6504218bc
commit 63946175ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,17 +330,17 @@ class ESPHomeManager:
return None return None
hass = self.hass hass = self.hass
voice_assistant_udp_server = VoiceAssistantUDPServer( self.voice_assistant_udp_server = VoiceAssistantUDPServer(
hass, hass,
self.entry_data, self.entry_data,
self._handle_pipeline_event, self._handle_pipeline_event,
self._handle_pipeline_finished, self._handle_pipeline_finished,
) )
port = await voice_assistant_udp_server.start_server() port = await self.voice_assistant_udp_server.start_server()
assert self.device_id is not None, "Device ID must be set" assert self.device_id is not None, "Device ID must be set"
hass.async_create_background_task( hass.async_create_background_task(
voice_assistant_udp_server.run_pipeline( self.voice_assistant_udp_server.run_pipeline(
device_id=self.device_id, device_id=self.device_id,
conversation_id=conversation_id or None, conversation_id=conversation_id or None,
flags=flags, flags=flags,