$ account alandtse
This repository is a Home Assistant custom component that integrates Amazon Alexa/Echo devices into Home Assistant. It allows users to control media playback (play, pause, volume, source selection), manage alarms and timers, control smart home devices (lights, switches, sensors, alarm control panel for Alexa Guard), and send notifications (TTS, announcements, mobile push). The component authenticates with Amazon's unofficial internal API via the `alexapy` library, supporting OAuth, TOTP, and 2FA. Architecture follows Home Assistant's component pattern: a config flow for setup, multiple entity platforms (media_player, sensor, switch, light, alarm_control_panel, binary_sensor, notify), a `DataUpdateCoordinator` for polling with HTTP2 push fallback, and custom services. Data flows from Amazon's cloud to HA via either polling (configurable interval) or push updates (WebSocket/HTTP2), with caching and debouncing to reduce API calls. External dependencies include `alexapy`, `packaging`, `wrapt`, and `dictor`. The component is distributed via HACS (Home Assistant Community Store) and supports multiple Amazon accounts with extensive localization.