Remove useless _handle_pipeline_event function in ESPHome (#109484)

This commit is contained in:
J. Nick Koston 2024-02-03 07:15:56 -06:00 committed by GitHub
parent 897ea272d6
commit 5bda4be88f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,6 @@ from aioesphomeapi import (
UserService,
UserServiceArgType,
VoiceAssistantAudioSettings,
VoiceAssistantEventType,
)
from awesomeversion import AwesomeVersion
import voluptuous as vol
@ -330,11 +329,6 @@ class ESPHomeManager:
)
)
def _handle_pipeline_event(
self, event_type: VoiceAssistantEventType, data: dict[str, str] | None
) -> None:
self.cli.send_voice_assistant_event(event_type, data)
def _handle_pipeline_finished(self) -> None:
self.entry_data.async_set_assist_pipeline_state(False)
@ -358,7 +352,7 @@ class ESPHomeManager:
self.voice_assistant_udp_server = VoiceAssistantUDPServer(
hass,
self.entry_data,
self._handle_pipeline_event,
self.cli.send_voice_assistant_event,
self._handle_pipeline_finished,
)
port = await self.voice_assistant_udp_server.start_server()