I just installed a power meter in my house and it is measuring correctly.
I have solar panels installed in another location that I access via Growatt integration.
The Home Assistant should subtract the solar production from the grid consumption, but the opposite is happening and the HA shows as if I were consuming more than 105kWh!
You need a meter to record export. I believe that the grid reading needs to be positive for consumption and negative for export.
Potentially a template sensor, that does something like:
{% set g = states('sensor.grid_power')|float(0) %}
{% set s = states('sensor.solar_production')|float(0) %}
{% if (s-g) > 0 %}
-{{ (s-g) }}
{% else %}
{{ g }}
{% endif %}
So if the grid - solar, is still a positive value, then you are exporting the excess solar - so output a negative value -(grid - solar) otherwise just output grid consumption unchanged.