How jlopez77/deyeinverterha works
This is a Home Assistant custom integration for reading Deye hybrid-inverter metrics over Modbus TCP and exposing them as device-linked sensors. The main workflow is UI configuration and connection validation, periodic register acquisition, definition-driven parsing, then sensor publication. The graph also captures the legacy aggregate and installed-power production sensors, plus per-metric metadata for energy statistics and diagnostic statuses. Source excerpts show the runtime wiring; broader metric coverage and Energy dashboard use are documented in the README.
Main entry points: sensor.py Sensor platform · InverterData.py Inverter client · coordinator.py Update coordinator · config_flow.py Config flow
Components 15
Configuration
- Config flow
custom_components/deye_inverter/config_flow.py - Entry setup
custom_components/deye_inverter/__init__.py
Data acquisition
- Update coordinator
custom_components/deye_inverter/coordinator.py - Inverter client
custom_components/deye_inverter/InverterData.py
Metric interpretation
- Register parser
custom_components/deye_inverter/InverterDataParser.py - Register constants
custom_components/deye_inverter/const.py - Metric definitions
custom_components/deye_inverter/DYRealTime.txt
Home Assistant sensors
- Sensor descriptions
custom_components/deye_inverter/entity_descriptions.py - Sensor platform
custom_components/deye_inverter/sensor.py - Inverter sensors
custom_components/deye_inverter/sensor.py
Other components
- Integrator
- Home Assistant UI
- PySolarmanV5
- Deye inverter
- Home Assistant entities
Connections 19
- Integrator → Home Assistant UI: configures
README.md - Home Assistant UI → Config flow: starts setup
README.md - Config flow → Inverter client: tests connection
custom_components/deye_inverter/config_flow.py - Config flow → Entry setup: creates entry
- Entry setup → Update coordinator: creates
custom_components/deye_inverter/__init__.py - Update coordinator → Inverter client: fetches data
custom_components/deye_inverter/coordinator.py - Inverter client → PySolarmanV5: reads registers
custom_components/deye_inverter/InverterData.py - Deye inverter → Inverter client: serves Modbus
README.md - Inverter client → Register parser: parses registers
custom_components/deye_inverter/InverterData.py - Register parser → Register constants: uses blocks
custom_components/deye_inverter/InverterDataParser.py - Register parser → Metric definitions: loads definitions
custom_components/deye_inverter/InverterDataParser.py - Entry setup → Sensor platform: forwards platform
custom_components/deye_inverter/__init__.py - Sensor platform → Update coordinator: gets coordinator
custom_components/deye_inverter/sensor.py - Sensor platform → Sensor descriptions: builds descriptions
custom_components/deye_inverter/sensor.py - Sensor descriptions → Metric definitions: derives metadata
custom_components/deye_inverter/entity_descriptions.py - Sensor descriptions → Register constants: checks read ranges
custom_components/deye_inverter/entity_descriptions.py - Sensor platform → Inverter sensors: creates entities
custom_components/deye_inverter/sensor.py - Inverter sensors → Update coordinator: reads metrics
custom_components/deye_inverter/sensor.py - Sensor platform → Home Assistant entities: adds entities
custom_components/deye_inverter/sensor.py