The recorder.purge
service does not look at your includes and excludes. As documented, this is all it does:
Call the service recorder.purge
to start a purge task which deletes events and states older than x days, according to keep_days
service data.
So it does not matter what is in your include and exclude config. Any rows older then 10 days will be purged, any rows less then or equal to 10 days will not be purged.
If you want to purge data from a specific entity you believe has been wrongfully recorded, you need to use the recorder.purge_entities
service. And then you need to specify which entity IDs, domains and/or entity globs to purge. Note that this service does not default to your include and exclude config, it also does not look at that. You must specify some entities to purge and it will purge only those.
The only part of recorder that looks at your include and exclude config is the live-recording aspect. As in when an event comes in it looks at your config to see whether that event should be recorded or not. Once an event is in the DB, it is not purged unless it is older then keep_days
or you specifically tell recorder to purge its data via the recorder.purge_entities
service.
This is why I was saying before if you are just running it with the same value for keep_days
its really not doing much. You are already purging all data older then 10 days and repacking the DB every night at 4AM. Running the purge service again that same day won’t really have much work to do.