How partach/ha_felicity works
HA-Felicity is a Home Assistant integration for monitoring and controlling Felicity inverters over Modbus, with an optional energy-management workflow that schedules charging, selling, and flexible loads from prices, solar forecasts, and battery state. Users add an inverter through the UI, then Home Assistant polls and exposes device entities; the coordinator applies EMS schedules and controls the inverter. The README also documents two Lovelace cards, multi-inverter support, and serial/TCP connectivity. EMS logic and entity wiring are only partially sampled, so uncertain implementation links are omitted.
Main entry points: coordinator.py Update coordinator · type_specific.py Model register maps · config_flow.py Config flow · __init__.py Integration setup
Components 20
Setup and lifecycle
- Config flow
custom_components/ha_felicity/config_flow.py - Integration setup
custom_components/ha_felicity/__init__.py - Update coordinator
custom_components/ha_felicity/coordinator.py
Inverter access
- Model register maps
custom_components/ha_felicity/type_specific.py - T-REX 5K map
custom_components/ha_felicity/trex_five.py - T-REX 10K map
custom_components/ha_felicity/trex_ten.py - T-REX 25K map
custom_components/ha_felicity/trex_twenty_five.py - T-REX 50K map
custom_components/ha_felicity/trex_fifty.py - IVGM maps
custom_components/ha_felicity/ivgm.py
Energy management
- EMS scheduler
custom_components/ha_felicity/ems.py - MILP engine
custom_components/ha_felicity/milp.py
Home Assistant interface
- Device entities
custom_components/ha_felicity/sensor.py - Control entities
custom_components/ha_felicity/number.py - EV boost button
custom_components/ha_felicity/button.py - Inverter dashboard card
custom_components/ha_felicity/frontend/ha_felicity.js - EMS dashboard card
custom_components/ha_felicity/frontend/ha_felicity_ems.js
Other components
- Home Assistant user
- Home Assistant
- Felicity inverter
- Price and forecast inputs
Connections 22
- Home Assistant user → Config flow: configures
- Config flow → Integration setup: creates entry
- Integration setup → Update coordinator: sets up
- Update coordinator → Model register maps: selects model
- Model register maps → T-REX 5K map: uses map
- Model register maps → T-REX 10K map: uses map
- Model register maps → T-REX 25K map: uses map
- Model register maps → T-REX 50K map: uses map
- Model register maps → IVGM maps: uses map
- Update coordinator → Felicity inverter: reads and writes Modbus
- Update coordinator → Price and forecast inputs: reads prices and forecasts
- Update coordinator → EMS scheduler: calculates schedule
- Update coordinator → MILP engine: invokes when selected
- Update coordinator → Device entities: updates state
- Update coordinator → Control entities: handles control
- Update coordinator → EV boost button: handles boost
- Home Assistant → Update coordinator: runs integration
- Home Assistant → Inverter dashboard card: hosts card
- Home Assistant → EMS dashboard card: hosts card
- Inverter dashboard card → Home Assistant: reads entities and calls services
- EMS dashboard card → Home Assistant: reads entities and calls services
- Price and forecast inputs → Home Assistant: provided by integrations