Invalid 53€ expense in Energy dashboard for -0kWh energy exported

I have the strangest problem. Yesterday my Energy dashboard suddenly jumped and started showing a 53,03€ expense for energy export but at the same the entity tracking energy export stayed the same (texts not in English, sorry):

I checked the statistics from Developer tool and they show no change. The only thing I pick from there is that for some strange reason it switched yesterday from long time statistics to history at around the same time as the jump but the number stays the same.

I’m using HomeWizard Energy integration and it has been in use for more than a year with no problems and I haven’t updated or modified my HA yesterday in any way.

How do I fix this as the statistics don’t contain anything I can remove or modify?

The expense is a separate statistic that is individually editable, separate from the consumption.

It will be called sensor.[whatever your consumption entity]_cost

I didn’t find one with the _cost -suffix but there was one with _compensation. It didn’t show any outliers but by trying hour by hour I was able to find the invalid number and now it is fixed.

Thank you!

This leaves however the question, that how did this happen?

Oh right, _cost is for consumption entities, and _compensation is for production entities.

As for the exact reason, it’s hard to say, can be caused by subtle bugs in the integration and it takes quite a bit of digging to find it.

If it happens continually, open a core bug.