Dear All,
My Home Assitant DB home-assistant_v2.db is growing and growing although I have this recorder setting:
recorder: # Delete events and states older than 2 weeks purge_keep_days: 14
DB size is over 8 GB already. I think purge is not working since an update a couple of versions ago.
I tried manual purge with the service recorder.purge
, an found this in the log:
Jul 14 21:36:37 pi hass[22750]: Traceback (most recent call last): Jul 14 21:36:37 pi hass[22750]: File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner Jul 14 21:36:37 pi hass[22750]: self.run() Jul 14 21:36:37 pi hass[22750]: File "/home/pi/opt/homeassistant/lib/python3.5/site-packages/homeassistant/components/recorder/__init__.py", line 288, in run Jul 14 21:36:37 pi hass[22750]: purge.purge_old_data(self, event.keep_days, event.repack) Jul 14 21:36:37 pi hass[22750]: File "/home/pi/opt/homeassistant/lib/python3.5/site-packages/homeassistant/components/recorder/purge.py", line 17, in purge_old_data Jul 14 21:36:37 pi hass[22750]: purge_before = dt_util.utcnow() - timedelta(days=purge_days) Jul 14 21:36:37 pi hass[22750]: TypeError: unsupported type for timedelta days component: NoneType
Any help would be appreciated! Is this a bug? Should I change the configuration? How to keep this DB small?
Thanks!