In my case, the battery is only charged from the solar, never from grid.
My “grid” counter actually measures home usage and it is placed after the inverter.
So the correct “grid” number would be 10.8-6.77kWh. I need to check if my setup counts the battery charge in PV production or it’s separate. I suspect it’s separate and would have to actually add it to PV production, but that is easily done through templating helpers.