Energy consumption figure wrong

Trying to determine how HA calculates the energy used in the home as I am seeing two different values coming from HA and from my inverter.
Example today says used 36.8kwh
However the inverter reports only: 34.7kwh

Dashboard is set up like this:

How does HA work out that “Home” value?

Home = Solar Generation - Charge to Battery + Battery Discharge - Export to Grid + Grid Consumption

Home Assistant:
Home = 54.7 - 11.5 + 7.9 - 14.5 + 0.2
Home = 36.8 kWh

Your Inverter:
Home = Solar PV - Battery Charged + Battery Discharged + Grid Used - Grid Exported
Home = 54.7 - 11.5 + 8 + 0.3 - 14.5
Home = 37 kWh (pretty close, just rounding errors compared to HA).

So not sure why your inverter is reporting 34.7 for the Load.

I see now, thanks for that.
The monthly usage in HA is 855kwh and inverter (real) is 800kwh, so the HA value is pretty much useless as it only applies if net metering, which is not a thing for me :frowning:
I guess the value is correct if not exporting anything.
Wish there was a way to pass the consumption value from the inverter.

No, that would not add up either. I checked.

How does your metering work if not net metering?

Gross metering?

Just charged on used day or night units and then paid a fixed amount per unit exported.
It does add up though?

Or close enough, some of the values update in HA every hour so a little off and the grid used comes from a shelly EM not the inverter hence the little discrepancy