Partial erasure of device histories

Is it possible to partially delete the history of a device, for example, delete all history older than 1 year?

I’m asking this question because I set « unlimited » to keep the history, and when I see that a single device can store millions of states per year, I’m concerned about the size of the database and its performance over time.

From what I know, it’s the same configuration for all devices: unlimited, 1 year, 3 months, etc. So it’s all or nothing.
There is this ongoing request that might be what you’re looking for: Visualiser/modifier/supprimer une valeur dans l'historique d'un élement

ok I’ll add a supplement to the request

Hello,

It’s actually a pretty good idea for a new feature. Being able to choose the retention period per device (at the moment you click to keep the history). With the default period chosen in the general settings.

After that, I don’t know if it’s technically possible to do with DuckDB (different retention depending on the time series).

I admit that keeping my consumption indexes for a long period interests me, but temperatures over the years, less. Nevertheless, I like the temperature charts over short periods :slightly_smiling_face:, so I keep the history anyway.

@pierre-gilles is this concept of history per device feasible?

David.