So I have an above average interrest in data and statistics, so I have created sensors to see DB-growth thorughout my HA-journey.
When I got a zigbee-device that decided to start reporting shitloads of data, my DB grew enormously! A bit of help and investigation - and I found out that this device produced +10 mill rows of states in my DB
So with a little helpf from @tom_l and @michaelblight in this post Reduce recorder days,, keep long term statistics - #5 by ArveVM i figured I had to test how to purge single entities.
It is nothing new, but I don’t know if everyone is aware of the possibility - therefore creating this post.
So the recorder keep days is a global setting, which is run at night (04:12) or something,
But in addition to that, you can run a service to purge selected devices/entitites,
So if you do this ad-hoc, - you can easily get rid of your “hyperactive” states from a sensor
And I know this is a workaround, and I have reconfigured the sensor to not report that often - but I’d like to know how to reduce the huge amount of rows.
So if you have similar types of devices, you can put that service into an automation, much like it is presented as an option in the original documentation; Recorder - Home Assistant
So this is the way I got my DB down from +19mill to just 9mill rows, and to my friends that said “why create HAstats, its not nessesary” - I have to smile and say, you never know you know