yoni3210
(yoni mo)
April 29, 2019, 7:39pm
1
Hi Guys,
This is my config, my goal is to keep the Database size small as possible,
i would appreciate to receive any ideas to improve my config,
configuration.yaml :
history:
View all events in a logbook
logbook:
exclude:
entities:
- sensor.last_boot
- sensor.date
domains:
- sun
- weblink
recorder:
purge_keep_days: 1
purge_interval: 1
exclude:
domains:
- automation
- weblink
- updater
entities:
- sun.sun
- sensor.last_boot
- sensor.date
Thanks ,
You can exclude every single entity that you don’t need, and with an automation for the purge, you can do it every hour if you like, but keep in mind that the purge is also a write operation on the SD card.
Remove the options for purging from your config and create an automation for it.
- alias: Purge Database
initial_state: True
trigger:
platform: time
at: '02:22:22'
action:
service: recorder.purge
data:
keep_days: 7
repack: true
EDIT: You have to set purge_interval: 0 to disable HA’s default daily purge.
Not all installations are on SD Cards. Some use various disc drives.
yoni3210
(yoni mo)
April 30, 2019, 9:33am
4
Can you please help with how to write under service data:
is part one ok ?
about the purge
recorder:
purge_keep_days: 1 - This line to remove?
purge_interval: 0 - that’s ok ?
Thanks,
In configuration.yaml
recorder:
purge_interval: 0
Service data (not sure, don’t use Editor)
{"keep_days": 1, "repack": true }
kirpat
(Kir)
April 30, 2019, 10:42am
6
How to add purge data for some entities or domains after 5 days.
Is it possible?
apop
April 30, 2019, 6:18pm
8
No, the days to keep setting applies against all entities being tracked by the recorder component.