Help removing invalid data from Energy Dashboard

Hi Guys

Somehow, a few days ago, my energy dashboard thinks my solar array generated 7000 kWh of power in under an hour. Man that would be sweet if true! This setup has been running stable since January this year, this is the first time it’s happened. I’m going to put it down to an unexplained glitch and move on - will investigate further if it happens again.

Anyway, how do I remove this? It’s throwing all my graphs way out of whack.

1 Like

Under “Developer Tools” on the Statistics tab. On the far right beside your entity you should see a “ramp” icon. Click it and you can search around 30th August 7pm and find the rogue value. From there you can change it to zero (or another number).

3 Likes

What I normally do is look at the states either side of erroneous one(s) and take the average.

This was likely caused by your sensor reporting 0 instead of ‘unavailable’. There are ways to prevent this happening. If your sensor is defined in YAML please post it and we can help you fix it. Otherwise you may need to feed your sensor to a template sensor and feed that to the energy dashboard. You should probably also open an issue for the integration in this case too.

Thanks - I managed to fix it. Just changed it to Zero, didn’t have to guess/average out any values because it was 7:50 PM and there’s no sunlight here at this time of day.

The integration is not defined in the yaml, it’s teh builtin fronius integration:

How do I go about figuring out what happened to generate this value?

Have a look at the history graph for that sensor around that time. What does it look like?

Does it go to 0?

Are there gaps in the graph?

No gaps.

This is the “energy total” figure, i.e. how much it’s generated this year so far. It should only ever increase right? But it is rolling back strangely:

The rise back to the normal level is definitely what caused the erroneous energy dashboard reading.

What caused it to fall in the first place though? :man_shrugging:

You could open an issue for the Fronious integration but without debug logs not much can be done.

I had a look through the older closed issues for this integration and this was the closest I found. The advice was to update the inverter firmware.

You can filter this sort of thing from happening with a template sensor like this (one of mine):

template:
  - sensor:
      - name: "total_yield_filtered" 
        icon: "mdi:counter"
        unit_of_measurement: "kWh"
        state: "{{ states('sensor.total_yield')|float(0) }}"
        availability: "{{ states('sensor.total_yield')|float(0) > 4000 }}"

Replace the monitored sensor and change 4000 to 6000 as your normal level is above that. Then use this new sensor in the energy dashboard instead.

No idea why it rolled back. I did do some maintenance recently, but nothing on the 30th around the time that it did that.

I am already on the latest firmware (3.23.3-1)

I think I will leave it for now - I’ve run almost 10 months with this setup and it’s been rock solid. Will update this if it comes back.

@tom_l , I recently fixed an issue in HASS where a number of my Zigbee power plugs were reporting incorrect power usage.

Unfortunately, I now have incorrect data for a number of my “helper” entities (screenshot below). I tried the same method as above to fix this, however it doesn’t look like it will let me. If it matters, the entities I’m trying to fix are “helper” entities that convert instantaneous watts to kWh, daily kWh total and monthly kWh total. How can I fix these?

This just saved my day ! Thanks for pointing this out

1 Like

Hi!

EDIT: Created a new post instead

I had a similar issue, when one energy (kWh) reading happen to be -14000 kWh once. I adjusted it to 0 in the Developer Tools - Adjust a statistic. But the calculated price are still a very big negative value. How can I fix it?

EDIT: I finally found and adjusted the faulty sensors in Link to Developer tools: statistics – My Home Assistant