Most of the history database is sun state changes, if you use sun and recorder.
Actually, it’s not state changes, but sun’s elevation changes, one per minute.
I have many temperature sensors to generate data, and about 4000 state changes per day. Sun.sun-object generates one state change per minute, so there will be daily 1440 rows from sun.sun. Is this really necessary? Yearly it will be half a million rows.
How not to see sun.sun-rows:
some kind of black list to recorder?
in sun.sun-object switch to record only real state changes (above/below), record elevation only if really used/needed.
Later, if I have roller motor for my shades controlled by elevation of sun, there will be even more recorded rows, because controlling the shades will also generate state changes. I don’t know if that will be important data to record.
It would be nice if we could purge per recorder type: I personally don’t care about all the details of the sun state or my CPU, but there’s other stuf I do like to persist.
Just a quick look of the content of my DB, most entries of the type ‘state changed’ I don’t care about anymore.
I don’t neccesarily need to completely stop, but a configurable purge period per recorder type would certainly be nice.
I’m currently in the process of developing a HASS plugin that will read my smart energy meter and I would like to report over months/years in the end.
With the current data model that seems a challenge at it is.