I am new to Home Assistant and little by little I am getting started. I find myself in a problem, and that is that my database does not stop growing. A few days ago I made the following modification to the Configuration.yaml file:
With this I have managed to stabilize the database and it is no longer growing much, but I have no way to clean the data that exists from the last 30 days that the purge was done. I think it’s with the “repackage” statement, but I think setting “true” does it every two weeks. My question is if someone can tell me how to run the “repack” voluntarily. The goal is to be able to delete history more than 30 days. Could someone help me? Thank you.
No, the automation runs every day, keeping 3 days of History.
id is just an unique_id, something so HA can keep track of the automation (without id it is not visible in the automation editor)
Thanks, I’m going to try to do an automation by adding a device as an example, so that this one is included and the others are not. So this afternoon I’ll share it with you to see what you think, when you can. Thank you.
I am sorry, I can’t get it. I have tried a thousand ways. I have been able to obtain for a test that it only include one entity. So far so good, but the repack doesn’t do it for me and I still have a huge database. I have it in the following way:
auto_repack boolean (optional, default: true)
Automatically repack the database every second sunday after the auto purge. Without a repack, the database may not decrease in size even after purging, which takes up disk space and can make Home Assistant slow. If you disable auto_repack it is recommended that you create an automation to call the recorder.purge periodically. This flag has no effect if auto_purge is disabled.
But I don’t want the repack the second Sunday, I would like to do it manually, at will, maybe it is not possible. Don’t know.