@Un4Seen wrote:
I’ve recently learned that Home Assistant has these interesting integrations called “Recorder” and “History” which control how many days of events, sensor data, etc. are kept. That’s good, but in my opinion not enough. I, as a user, would like to be able to keep sensor data for years without making my DB huge. this could be done by aggregating older data into less detailed, smaller buckets. For example, it would be nice to:
- keep fully detailed recorded sensor data for the last 24 hours
- for previous days aggregate the detailed data and only keep the min/max/average for every hour
- for the previous weeks aggregate the daily data and only keep the min/max/average for every day
- for the previous months aggregate the weekly data and only keep the min/max/average for every week
- for the previous years aggregate the monthly data and only keep the min/max/average for every month
You see where I’m going with this? the further you go back in the past, the least details the user is interested in, but he still wants to know the min/max/average on a less granular level.
A good example is the energy produce by my solar panels. For today I want to be able to pot a detailed graph with values recorded every minute. But for yesterday it’s enough to have one value for each hour. For last week it’s enough to have the aggregated values per day. And if I want to plot a graph for last year, I only need the aggregated values on a monthly level (or on a daily level in the worst case).
Is there a way currently to achieve this? If not, I strongly suggest this for future development, because it’s a great compromise between sensor value lifetime and sensor value detail, while keeping the DB at decent sizes.
Thanks!
Posts: 1
Participants: 1