Negative water usage data / reset history data in Energy dashboard

Hi All,

To track my water usage, I scraped the data from my water softener by using my daily usage which is refreshed every 5min. I collect this data in a template sensor (see config below, which seems to work fine exept for 1 thing).

  - sensor:
      - name: "Verbruik - Water"
        unique_id: water_verbruik
        state: "{{ states('sensor.xxx_water_verbruik_volume_vandaag')|float * 0.001 }}"
        unit_of_measurement: m³
        device_class: water
        state_class: total_increasing

I sometimes have the issue that it registers a negative usage, equal to what I’ve used before. This obviously shouldn’t happen (see screenshots below). Any idea on how to fix this?


When this would be fixed, I’d prefer to start over again with clean data. So might it be possible to clear the current water usage data? If yes, how?

Thanks!

Can you edit the data in Developer Tools | Statistics?

Try this to prevent it happening again.

  - sensor:
      - name: "Verbruik - Water"
        unique_id: water_verbruik
        state: "{{ states('sensor.xxx_water_verbruik_volume_vandaag')|float(0) * 0.001 }}"
        availability: "{{ states('sensor.xxx_water_verbruik_volume_vandaag')|is_number }}"
        unit_of_measurement: m³
        device_class: water
        state_class: total_increasing

thanks! I’ll try it!

I can edit the values, however it’s always 0, there’s no negative value to be seen.

EDIT:

After further inspection it seems normal that I can’t find any negative values (see picture below). However this doesn’t explain why there’s a negative value in the energy dashboard.

Over here you can also clearly see the drops in connetion that will hopefully be solved by the addition made by @tom_l

I would like to push this Topic.
Is there a way to reset the counter at all, like really start from the beginning with the water meter ?

I tried som different stuff in the past, now i have a smooth running AI-on the Edge system which is working fine.
But the old stats are still there, most of the a totally inaccurate.

So, is there a way to tell HA to forget all old Data and start from new, so the history actually will make sense ?

Thanks

1 Like

Got the same issue, after few days of having the reader out of the network once plugged I’ve got -230m3 usage followed by actual usage next hour (like few liters).
This is rly annoying. Did you managed to fix the issue ?

Sorry for late response
No i did not solve it, it just lived with it right now…

Its not the worst just annoying :slight_smile:

Hi, same issue here! Anyone found a solution to reset the water history?

EDIT : as ever, Tom_I saves the day Delete Value from Energy Dashboard - #2 by tom_l