Change energy dashboard values

Hello

I have an issue with the energy dashboard.
on Sept. 10, something seems to have gone wrong with the analysis of power and gas data. As a result, there are incorrect values in my summary

Can I still correct this error?

I installed phpMyAdmin to access the MariaBD.
In the homeassistant / statistics table I see lots of values. Anyone have any idea which one I should adjust?

Thank you in advance!

5 Likes

Go to Developer Tools ā†’ Statistics.

Find your sensor and click on the little ramp icon to the right.

Navigate to the date and time of the issue and change the value(s) to an average of whatever came before and after.

Then investigate what is causing this issue and fix it so it does not happen again.

17 Likes

Your screenshot seems to miss the last column which should be meta_id. If you look in the statistics_meta table and find the id for the entities that the energy dashboard is using and then look at the statistics table for those meta_ids in the timeframe where your issue lies. Either the adjust bad values or delete them.

Ok never knew that function existed in UI. @tom_l s answer is much better! :grinning:

Thank you @tom_l , it worked great for meā€¦ I asked the same question a couple of months ago and I got an answer which was to edit configuration file of HAā€¦ and of course I did not edit those filesā€¦too riskyā€¦ Your solution to correct the data is safe and quickā€¦ Thanks again !

1 Like

Thank you so much!
Everything looks smooth again :smiley:

Thank you also Mark
I have successfully applied Tomā€™s method

Now you need to work out why it happened to stop it happening again.

Look at the history graph for the energy sensor at the time it happened.

What does it look like?

At that time there was a power failure
I canā€™t link it to anything else at the moment, but keep an eye on it

1 Like

Show the history graph of the energy sensor at that time.

My guess is that it is going to 0 rather than unavailable.

State changes from <total_energy> ā†’ unavailable ā†’ <total_energy> are not registered by the energy dashboard.

State changes from <total_energy> ā†’ 0 ā†’ <total_energy> will be registered by the energy dashboard as an increase of <total_energy>

2 Likes

I only keep the history of sensors for 1 week
So unfortunately I canā€™t provide you the data?

It worked for me some weeks ago. However, I tried to fix a value yesterday in the same statistics and it didnā€™t work anymore. Was there a change in HA?

Saved my day!
Here is another solution, but way more complicated :smile:

Many of my sensors donā€˜t have the ramp in statistic and I wonder why one sensor has this featureand others not?

You can only adjust sensors that have the attribute state_class defined as total or toal_increasing.

Hello,

Found the possibility to change values on the statistics tab.
Is there also a possibility to add entries in the energy sensors?
Thanks already!

All my sensor are showing 0kw. even if i have aswell a day where eveyrthing was summarized on one day with 200kw consumption and about 150kw solar. But the figures in the statistic tab are still showing 0kw in this day. There is aswell no entry for this specific hour when it happend and im pretty sure i am on the right attributes.
Does anyone know a solution?

I had a problem where for some reason my Hoymiles solar panel integration got broken after a power outage (an unexpected update to addon fixed it later suprisingly!), and because of that, I have two days where on energy panel I donā€™t have ANY solar production (or, HA thinks so).

Thanks to @tom_l and this thread, I was able to adjust few days that had incorrect values (the day when power outage happened for example), and it was easy! But what about those two days that donā€™t have any values to adjust? When I select a day, HA just says ā€œNo statistics found for this periodā€.


I have the same problem with a value in the statistic. I found the incorrect entry and changed it on the Developer/Statistic page. Here I can find it anymore. The graph shows still the incorrect value. Do I need to refresh something?

2 Likes

Anyone an idea how to check the values in the DB? Or a link to a video about it?