1 """Provide helper functions for the TTS."""
3 from __future__
import annotations
5 from typing
import TYPE_CHECKING
9 from .const
import DATA_COMPONENT, DATA_TTS_MANAGER
12 from .
import TextToSpeechEntity
13 from .legacy
import Provider
17 hass: HomeAssistant, engine: str
18 ) -> TextToSpeechEntity | Provider |
None:
19 """Get engine instance."""
20 if entity := hass.data[DATA_COMPONENT].
get_entity(engine):
23 return hass.data[DATA_TTS_MANAGER].providers.get(engine)
CalendarEntity get_entity(HomeAssistant hass, str entity_id)
TextToSpeechEntity|Provider|None get_engine_instance(HomeAssistant hass, str engine)