It has been setup like this for the last 18 months (why did it take me so long to notice this!)… so unfortunately, I don’t think it will be correct tomorrow… (actually, when I first set this up, it may have been a different figure I used - so this may well help explain part of the issue - however, clearly my newer value has never populated through…).
Dit you fix statistics errors in export? There are cost sensors too, if you didn’t fix those at the same time, you’d get a difference too. Those sensors have similar entity ids, ending with _cost, maybe you should check them for outliers.
Seems like export has a name with Wh and price for kWh. That should lead to a factor 1000 difference. But is the unit of the export sensors maybe something else, leading it to use some conversion factor?
the name shows Wh but that does not really say anything. You should look at the unit_of_measurement in the developer tools. I have no clue what happens if it is J.
Some other thought: is the export ever going up and down? It shouldn’t, if it does the cost might only count the part that moves in the right direction.
It does reset to 0. That is ok, as long as it has state_class total_increasing, and not total. If so, the drop might be considered as a negative instead of reset.