I tried: end: "{{(now() - timedelta(days=7))}}" with an extra ‘)’.
But that does not do it no. And indeed I have:
recorder:
purge_keep_days: 2
And I remember from a long time ago, it did not make homeassistant fast when using more days. But not sure if that is nowadays still the case since this is a very old config I think. i use influxdb and grafana for my graphs…
Is there a possibility to selectively allow longer purge days for specific entities? I don’t know how to achieve else tot set 14 days and exclude “all but” for now and the future.
I now have below. It’s a “wise” collection of all kinds of legacy stuff that I once added to make my system run more smooth. But I think it is outdated and I have to look up the article of reading mysql and exclude stuff. Any tip on how to globally set to 14 days and locally exclude all other.
I guess I am looking to some easy way to inverse the logic of instead of excluding a huge list of who knows what to include specific items… I may want to start a feature request / vote topic for that.
recorder:
purge_keep_days: 2
exclude:
domains:
- automation
- weblink
- updater
- camera
entities:
- sun.sun # Don't record sun data
- sensor.last_boot # Comes from 'systemmonitor' sensor platform
- sensor.date
- sensor.long_power_failure_count
- sensor.power_tariff
- sensor.short_power_failure_count
- sensor.voltage_sags_phase_l1
- sensor.voltage_swells_phase_l1
- sensor.frontdoor_process_fps
- sensor.detection_fps
entity_globs:
- sensor.nextion*
- sensor.synology*
event_types:
- call_service # Don't record service calls