Hi.
I am aware there are a number of topics on this, but having been unable to find a definitive answer, I am starting this (hope this is ok).
I am running home assistant in docker on a RPi3 and the home-assistant_v2.db file is growing quickly each day.
I have tried running the purge service from the front end, without there seeming to be any response at all.
My configuration.yaml includes the following section:
# Configuration for history component
recorder:
purge_interval: 1
purge_keep_days: 7
exclude:
domains:
- sensor
- media_player
entities:
- sun.sun
Can anyone give any help on why the purge doesn’t work and ultimately, how to turn off the recorder function.
(Nod to developers - it would be nice to have a switch or similar for this)
Many thanks in advance
Thanks for the reply tom_I.
Doesn’t seem to work. I even tried making an automation which fires the service call. H.Assistant reports the event was fired:
But the db file is unchanged and keeps steadily growing.
Note quite following you on the “Also not that restarting home assistant resets the purge interval counter.”
do you mean that if h.a. gets restarted, the purge inteval timer resets?
Ahh gotcha, thanks.
I could of course use a bash script to delete the db files every 24 hours but it doesn’t cut down on the (for me) unnecessary disk activity on the pi’s sd card
The best solution would still be to be able to turn the recorder off (or to a bare minimum of activity).
Looks like it’s working now by removing it from config!
Strange, as the recorder section was something I had to add previously to the config when attempting to control the db file. I updated recently to 96.3. maybe that has helped?
The recorder section is still not limiting entries in the db file, so for now it’s all or nothing but at least I can select the nothing option.
Thanks for the help guys
That’s the whole point of the recorder section. To limit and manipulate the db. If you have sensors that update frequently and they are in recorder, your disk activity will always be high with recorder even if you only have 1 item.