How to delete specific data from the Energy dashboard?

I switched to use Enphase Envoy integration today, before that I was using the DEV version. The new sensor was created in kW instead of W, so my script made an error to produce in kkWh (kilo kWh).

How to DELETE those incorrect data from the database? Which table should I look for?

Here it is now showing incorrect data:

image

If you know the period of the bad data, you can adjust it from the Developer Tools, Statistics option.
Search for the relevant sensor and select the statistic graph icon.
You will get a pop-up allowing you to adjust the value.

One lesson I learnt when I had this happen to me is to not use the hardware sensor directly. Load it into a utility meter and use that. That way if you change the hardware or rename the sensor, it won’t mess anything up until you match it in the utility meter so you can check it looks right beforehand.

4 Likes

Unfortunately, it seems I cannot edit from that Statistics user interface:
image

And yes, I don’t use the hardware sensor directly. I created a sensor and use that sensor for the Energy Dashboard.

image

Here is the Energy Dashboard configuration for the Solar Panel, using that sensor:

image

This is where it is showing wrong data:

image

And here is the CORRECT data from yesterday:

Shame the Statistics one didnt work for you - that’s by far the easiest method.

If you can afford to lose all of your energy data, you can delete the home-assistant_v2.db in the config folder and restart (this will delete every sensor value however).
If you’ve too much and can’t afford to lose any, there’s several methods others have used.
e.g.
Remove bad data from energy database

Before updating, I made snapshot (HA is installed on Proxmox). I ended up with restroring that snapshot to go back.

So, I need to think how I can update this Enphase Integration.

I am thinking to do this:

  • Make snapshot
  • Remove the data-feed of the Energy Dashboard Solar Panels (to avoid getting bad data)
  • Remove Enphase (DEV) integration
  • Reboot
  • Add Official Enphase integration
  • Fix the data-feed by recreating the Riemann helper (change from W to kW data-source)
  • Verify the new data-feed to have correct data (using chart, plot the data)
  • Add the data-feed to the Energy Dashboard Solar Panels

I think, that would do. Any thought?

Sounds like a fair plan.
Just to be on the safe side I’d add some steps.

  • rename the source sensor to the helper to a dummy name before changing feed
  • verify the new feed is producing correct values
  • calibrate utility meter if incorrect
  • rename sensor back to source
    I’m assuming the Riemann feeds into a utility meter which is then used in the energy dashboard.
1 Like