Clean up internal_get_tts_audio in TTS entity (#148946)

This commit is contained in:
Artur Pragacz 2025-07-23 11:26:54 +02:00 committed by GitHub
parent c4d742f549
commit 7aa4810b0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -165,18 +165,6 @@ class TextToSpeechEntity(RestoreEntity, cached_properties=CACHED_PROPERTIES_WITH
self.async_write_ha_state() self.async_write_ha_state()
return await self.async_stream_tts_audio(request) return await self.async_stream_tts_audio(request)
@final
async def async_internal_get_tts_audio(
self, message: str, language: str, options: dict[str, Any]
) -> TtsAudioType:
"""Load tts audio file from the engine and update state.
Return a tuple of file extension and data as bytes.
"""
self.__last_tts_loaded = dt_util.utcnow().isoformat()
self.async_write_ha_state()
return await self.async_get_tts_audio(message, language, options=options)
async def async_stream_tts_audio( async def async_stream_tts_audio(
self, request: TTSAudioRequest self, request: TTSAudioRequest
) -> TTSAudioResponse: ) -> TTSAudioResponse: