How hoangquan90/lumentreeha works
This is a Home Assistant integration for Lumentree hybrid solar inverters. A user configures a device; the integration retrieves device information over HTTP, connects to the inverter over MQTT, parses live Modbus readings, and exposes them as Home Assistant entities. Separately, HTTP statistics are fetched and cached to provide daily, monthly, yearly, and lifetime energy and savings. The graph reflects the sampled setup, client, parser, cache, and entity code plus major README capabilities; some coordinator and platform wiring is documented but not sampled, so uncertain links are omitted.
Main entry points: __init__.py Entry Runtime · aggregator.py Stats Aggregator · sensor.py Sensor Entities · mqtt_client.py MQTT Client
Components 20
Integration Setup
- Config Flow
config_flow.py - Entry Runtime
__init__.py - HTTP API Client
core/api_client.py
Live Monitoring
- MQTT Client
core/mqtt_client.py - Realtime Parser
core/realtime_parser.py - Update Dispatcher
core/mqtt_client.py
Energy Statistics
- Stats Aggregator
services/aggregator.py - Statistics Cache
services/cache.py - Daily Coordinator
coordinators/daily_coordinator.py - Monthly Coordinator
coordinators/monthly_coordinator.py - Yearly Coordinator
coordinators/yearly_coordinator.py - Lifetime Coordinator
coordinators/total_coordinator.py - Backfill Services
__init__.py
Home Assistant Entities
- Sensor Entities
entities/sensor.py - Binary Sensors
entities/binary_sensor.py - Diagnostics
diagnostics.py
Other components
- Home Assistant User
- Home Assistant
- Lumentree HTTP API
- Lumentree Inverter
Connections 32
- Home Assistant User → Config Flow: configures
- Config Flow → Entry Runtime: sets up entry
- Entry Runtime → HTTP API Client: creates
- Entry Runtime → MQTT Client: starts
- Entry Runtime → Stats Aggregator: creates
- Entry Runtime → Daily Coordinator: creates
- Entry Runtime → Monthly Coordinator: creates
- Entry Runtime → Yearly Coordinator: creates
- Entry Runtime → Lifetime Coordinator: creates
- HTTP API Client → Lumentree HTTP API: requests data
- MQTT Client → Lumentree Inverter: connects and polls
- Lumentree Inverter → MQTT Client: sends readings
- MQTT Client → Realtime Parser: parses payload
- MQTT Client → Update Dispatcher: dispatches updates
- Update Dispatcher → Sensor Entities: updates live sensors
- Update Dispatcher → Binary Sensors: updates status
- Stats Aggregator → HTTP API Client: fetches statistics
- Stats Aggregator → Statistics Cache: reads and writes
- Daily Coordinator → HTTP API Client: fetches daily data
- Daily Coordinator → Statistics Cache: finalizes daily data
- Monthly Coordinator → Stats Aggregator: gets aggregates
- Yearly Coordinator → Stats Aggregator: gets aggregates
- Lifetime Coordinator → Stats Aggregator: loads yearly data
- Sensor Entities → Daily Coordinator: reads updates
- Sensor Entities → Monthly Coordinator: reads updates
- Sensor Entities → Yearly Coordinator: reads updates
- Sensor Entities → Lifetime Coordinator: reads updates
- Entry Runtime → Backfill Services: registers services
- Backfill Services → Stats Aggregator: runs backfill
- Backfill Services → Statistics Cache: purges cache
- Entry Runtime → Diagnostics: provides entry data
- Home Assistant → Entry Runtime: hosts integration