How thomluther/ha-anker-solix works
Anker Solix is a Home Assistant integration for monitoring and controlling Anker power-system devices. Users configure an account, the integration retrieves cloud data (with MQTT as an optional device-data/control channel), and Home Assistant exposes the resulting device, system, and account data as entities and controls. The graph preserves the cloud/API, MQTT, and entity-platform branches. Source excerpts are partial; links to unsampled subsystems are included only where the README or source index supports them.
Main entry points: coordinator.py Data coordinator · api.py Solix API · mqtt_device.py MQTT device control · api_client.py Integration client
Components 26
Setup and runtime
- Configuration flow
custom_components/anker_solix/config_flow.py - Integration client
custom_components/anker_solix/api_client.py - Data coordinator
custom_components/anker_solix/coordinator.py
Cloud API
- Solix API
custom_components/anker_solix/solixapi/api.py - API transport base
custom_components/anker_solix/solixapi/apibase.py - Cloud session
custom_components/anker_solix/solixapi/session.py - API data types
custom_components/anker_solix/solixapi/apitypes.py - Home energy systems
custom_components/anker_solix/solixapi/hesapi.py - Device poller
custom_components/anker_solix/solixapi/poller.py - Schedules and plans
custom_components/anker_solix/solixapi/schedule.py
MQTT devices
- MQTT device control
custom_components/anker_solix/solixapi/mqtt_device.py - MQTT device factory
custom_components/anker_solix/solixapi/mqtt_factory.py - MQTT state mappings
custom_components/anker_solix/solixapi/mqttmap.py - MQTT command mappings
custom_components/anker_solix/solixapi/mqttcmdmap.py
Home Assistant entities
- Shared entity model
custom_components/anker_solix/entity.py - Monitoring entities
custom_components/anker_solix/sensor.py - Device controls
custom_components/anker_solix/number.py - Select controls
custom_components/anker_solix/select.py - Switch controls
custom_components/anker_solix/switch.py - Action controls
custom_components/anker_solix/button.py - Date and time controls
custom_components/anker_solix/datetime.py - Time controls
custom_components/anker_solix/time.py - Integration services
custom_components/anker_solix/services.py
Other components
- Home Assistant user
- Anker cloud API
- Anker MQTT service
Connections 28
- Home Assistant user → Configuration flow: configures
README.md - Configuration flow → Integration client: provides settings
custom_components/anker_solix/config_flow.py - Integration client → Solix API: calls
custom_components/anker_solix/api_client.py - Integration client → MQTT device factory: creates devices
custom_components/anker_solix/api_client.py - Integration client → MQTT device control: tracks devices
custom_components/anker_solix/api_client.py - Data coordinator → Integration client: refreshes data
custom_components/anker_solix/coordinator.py - Solix API → API transport base: uses transport
custom_components/anker_solix/solixapi/api.py - API transport base → Cloud session: uses session
custom_components/anker_solix/solixapi/apibase.py - Cloud session → Anker cloud API: authenticates and requests
custom_components/anker_solix/solixapi/session.py - Solix API → Anker cloud API: retrieves device data
README.md - Solix API → API data types: uses definitions
custom_components/anker_solix/solixapi/api.py - Solix API → Home energy systems: uses HES support
custom_components/anker_solix/solixapi/api.py - Solix API → Device poller: uses polling
custom_components/anker_solix/solixapi/api.py - Solix API → Schedules and plans: uses scheduling
custom_components/anker_solix/solixapi/api.py - MQTT device control → Anker MQTT service: communicates
README.md - MQTT device factory → MQTT device control: creates instances
custom_components/anker_solix/api_client.py - MQTT device control → MQTT state mappings: decodes device data
custom_components/anker_solix/solixapi/mqtt_device.py - MQTT device control → MQTT command mappings: encodes commands
custom_components/anker_solix/solixapi/mqtt_device.py - MQTT device control → API data types: uses definitions
custom_components/anker_solix/solixapi/mqtt_device.py - Data coordinator → Shared entity model: provides shared data
custom_components/anker_solix/coordinator.py - Monitoring entities → Data coordinator: reads updates
custom_components/anker_solix/sensor.py - Device controls → Data coordinator: reads and updates
custom_components/anker_solix/number.py - Select controls → Data coordinator: reads and updates
custom_components/anker_solix/select.py - Switch controls → Data coordinator: reads and updates
custom_components/anker_solix/switch.py - Action controls → Data coordinator: invokes actions
custom_components/anker_solix/button.py - Date and time controls → Data coordinator: reads and updates
custom_components/anker_solix/datetime.py - Time controls → Data coordinator: reads and updates
custom_components/anker_solix/time.py - Integration services → Shared entity model: uses shared model
custom_components/anker_solix/services.py