2025-05-11 21:56:55 +08:00
|
|
|
from homeassistant.config_entries import ConfigEntry
|
|
|
|
|
from homeassistant.const import Platform
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
|
|
|
|
|
DOMAIN = "tencentcloud_asr"
|
|
|
|
|
|
|
|
|
|
PLATFORMS = (Platform.STT,)
|
|
|
|
|
|
2025-05-11 23:18:06 +08:00
|
|
|
# const key
|
|
|
|
|
SecretIdKey = "secretid"
|
|
|
|
|
SecretKeyKey = "secretkey"
|
|
|
|
|
ModelKey = "model"
|
|
|
|
|
|
2025-05-11 21:56:55 +08:00
|
|
|
|
|
|
|
|
async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry):
|
|
|
|
|
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry):
|
|
|
|
|
return await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)
|