1 """Base class for assist satellite entities."""
5 import voluptuous
as vol
13 from .connection_test
import ConnectionTestView
18 AssistSatelliteEntityFeature,
21 AssistSatelliteAnnouncement,
22 AssistSatelliteConfiguration,
23 AssistSatelliteEntity,
24 AssistSatelliteEntityDescription,
25 AssistSatelliteWakeWord,
27 from .errors
import SatelliteBusyError
28 from .websocket_api
import async_register_websocket_api
32 "AssistSatelliteAnnouncement",
33 "AssistSatelliteEntity",
34 "AssistSatelliteConfiguration",
35 "AssistSatelliteEntityDescription",
36 "AssistSatelliteEntityFeature",
37 "AssistSatelliteWakeWord",
41 _LOGGER = logging.getLogger(__name__)
43 PLATFORM_SCHEMA_BASE = cv.PLATFORM_SCHEMA_BASE
46 async
def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
47 component = hass.data[DATA_COMPONENT] = EntityComponent[AssistSatelliteEntity](
50 await component.async_setup(config)
52 component.async_register_entity_service(
55 cv.make_entity_service_schema(
57 vol.Optional(
"message"): str,
58 vol.Optional(
"media_id"): str,
61 cv.has_at_least_one_key(
"message",
"media_id"),
63 "async_internal_announce",
64 [AssistSatelliteEntityFeature.ANNOUNCE],
66 hass.data[CONNECTION_TEST_DATA] = {}
74 """Set up a config entry."""
79 """Unload a config entry."""
None async_register_websocket_api(HomeAssistant hass)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup(HomeAssistant hass, ConfigType config)