How to completely delete old sensor history

Hello all,
I have a current sensor that I was calibrating and now it’s history is full of garbage data.

I tried using the purge service which successfully deleted the history in the “more history tab”

But when I click the sensor to see the history graph the old data is still there!

Screenshot from 2023-04-09 20-19-26

After this I have tried the following:

-Restart HA
-Reload conf
-Reboot server
-Deleted old sensor and re-added it under a new name after re-flashing from esphome with a new name and id for the sensor
-Deleted browser cache completely

Please help as this is driving me crazy

Ok So I solved it by going to ‘’‘Deleoper Tools → Statistics’’’ where I found the sensors with problems such as changed unit or no state, so I found this sensor as I have changed its unit from V when testing to A when done calibrating and after clicking on it it gave me an option to clear all old sensor data which I did and now it’s all clean!!!.

3 Likes