mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix typo in ElevenLabs (#133819)
This commit is contained in:
parent
84a3a9d495
commit
a2aba77973
@ -35,10 +35,10 @@ class ElevenLabsData:
|
||||
model: Model
|
||||
|
||||
|
||||
type EleventLabsConfigEntry = ConfigEntry[ElevenLabsData]
|
||||
type ElevenLabsConfigEntry = ConfigEntry[ElevenLabsData]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: EleventLabsConfigEntry) -> bool:
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ElevenLabsConfigEntry) -> bool:
|
||||
"""Set up ElevenLabs text-to-speech from a config entry."""
|
||||
entry.add_update_listener(update_listener)
|
||||
httpx_client = get_async_client(hass)
|
||||
@ -60,15 +60,13 @@ async def async_setup_entry(hass: HomeAssistant, entry: EleventLabsConfigEntry)
|
||||
return True
|
||||
|
||||
|
||||
async def async_unload_entry(
|
||||
hass: HomeAssistant, entry: EleventLabsConfigEntry
|
||||
) -> bool:
|
||||
async def async_unload_entry(hass: HomeAssistant, entry: ElevenLabsConfigEntry) -> bool:
|
||||
"""Unload a config entry."""
|
||||
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
||||
|
||||
|
||||
async def update_listener(
|
||||
hass: HomeAssistant, config_entry: EleventLabsConfigEntry
|
||||
hass: HomeAssistant, config_entry: ElevenLabsConfigEntry
|
||||
) -> None:
|
||||
"""Handle options update."""
|
||||
await hass.config_entries.async_reload(config_entry.entry_id)
|
||||
|
@ -19,7 +19,7 @@ from homeassistant.helpers.selector import (
|
||||
SelectSelectorConfig,
|
||||
)
|
||||
|
||||
from . import EleventLabsConfigEntry
|
||||
from . import ElevenLabsConfigEntry
|
||||
from .const import (
|
||||
CONF_CONFIGURE_VOICE,
|
||||
CONF_MODEL,
|
||||
@ -92,7 +92,7 @@ class ElevenLabsConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
@staticmethod
|
||||
def async_get_options_flow(
|
||||
config_entry: EleventLabsConfigEntry,
|
||||
config_entry: ElevenLabsConfigEntry,
|
||||
) -> OptionsFlow:
|
||||
"""Create the options flow."""
|
||||
return ElevenLabsOptionsFlow(config_entry)
|
||||
@ -101,7 +101,7 @@ class ElevenLabsConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
class ElevenLabsOptionsFlow(OptionsFlow):
|
||||
"""ElevenLabs options flow."""
|
||||
|
||||
def __init__(self, config_entry: EleventLabsConfigEntry) -> None:
|
||||
def __init__(self, config_entry: ElevenLabsConfigEntry) -> None:
|
||||
"""Initialize options flow."""
|
||||
self.api_key: str = config_entry.data[CONF_API_KEY]
|
||||
# id -> name
|
||||
|
@ -22,7 +22,7 @@ from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from . import EleventLabsConfigEntry
|
||||
from . import ElevenLabsConfigEntry
|
||||
from .const import (
|
||||
CONF_OPTIMIZE_LATENCY,
|
||||
CONF_SIMILARITY,
|
||||
@ -56,7 +56,7 @@ def to_voice_settings(options: MappingProxyType[str, Any]) -> VoiceSettings:
|
||||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
config_entry: EleventLabsConfigEntry,
|
||||
config_entry: ElevenLabsConfigEntry,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up ElevenLabs tts platform via config entry."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user