Now my database keeps growing I am looking for a way to purge it, with conditions.
I want to keep for example the last, first, max value of some entities per day/per week or per month.
Some other entities I only want to keep the values of last week.
As far as I can see this is not possible in HASS. Anyone does something similar and how do you that?
I am thinking of something like a scheduled task. Should I migrate to mariadb or should I get some knowledge of python.
I have some knowledge of SQL and queries.