Hi @del13r, thanks for your explanation. Again, no issues with the Power calculations.
My point is towards energy sensors, not to the power sensors. Grid Energy import/export for use with HA Energy dashboard actually are available since HA 2024.3 in pull request 110884, data provided by pyenphase in PR 133 and PR 135.
Pyenphase is getting the energy data from json[1].actEnergyDlvd and json[1].actEnergyRcvd as you describe in Enphase Envoy - D7 firmware with JWT - A Different Approach. Since this addition one can opt in HA Energy dashboard to:
- use the
Envoy Lifetime net energy consumption
entity forGrid consumption
- use the
Envoy Lifetime net energy production
entity forReturn to grid
So again, not disagreeing with how you calculate Energy from all power sensors. Just trying to share that the native integration has Grid Energy import/export these days from the data sources you describe in your article.