Hello, I have a water flow sensor, and due to a software issue by the developers, its been reporting incorrect (very high) cumulative usage amounts. its been fixed now but when i add it to my energy dashboard, i get a massive correction:
I tried deleting the device, but it is autodiscovered via MQTT, and deleting it didnt seem to clear out the historic data anyway - whats the best way to nuke the history for this one particular sensor (or the whole device, im easy going at this point)
I have a fair few data points that’re quite tedious to set to 0 on the adjustment page (like a month worth as its taken that long to fix)
There is the entry_id that’s already there, mostly hidden, and the unique_id and the back end uses that stuff as I understand it.
As long as you are supplying a unique_id in the MQTT discovery, you should be able to go in the UI with the Grat and change the entity_id.
Worst thing that I think can happen is you remember what the entity_id is and change it back before restarting HA and it is the way you started.
I am like 90% sure of this, I don’t do it often, but this is how I understand it. I know if you change it back before restart that it will revert 100%. The other stuff is the I believe that is what happens.
And no, that first sentence is not a typo. There is an:
device_id that is a string of hex
entity_id that is a string of hex
entity_id that is lower_case_chase_text
entry_id
unique_id
name (At least one, maybe others I don’t know about)
I get errant data on a few sensors (including my water use sensor) once in a while and I delete them from the statistics tables in the DB. Are you comfortable making a DB backup and trying that?
You should be able to use the Recorder Purge Entities action in Settings → Developer Tools → Actions. Search for ‘Purge Entities’. From there you specify the entity and the number of days to keep (0).
It is setting a unique_id based on that string you posted, so you can change the entity_id in the UI using the gear.
But what they said is not I think going to purge LTS data.
This seems to have done the job!!
I’ll see how it goes for the next hour rollover, but i purged everything older than 1 day (since i only updated the firmware yesterday!) and it seems to have done the job
(I had to update HA a few versions in order to see this option, just adding that in case someone comes looking for a solution and are running an older version)