Recorder configuration error

Hi,

My db file is growing so I added recorder configuration to keep only 2 weeks of data.
Just added the following to the config

recorder:
  purge_keep_days: 14

Restarted home assistant and got this error:
ERROR (MainThread) [homeassistant.config] Invalid config for [recorder]: some but not all values in the same group of inclusion 'purge' @ data['recorder'][<purge>]. Got None. (See /var/opt/homeassistant/configuration.yaml, line 49). Please check the docs at https://home-assistant.io/components/recorder/

I double-checked config and searched for similar errors but cannot figure out what im doing wrong. The recorder component page does not specify any non-optional parameters and i think something is missing… but what ?!

I think purge_keep_days: needs to be indented

recorder:
   purge_keep_days: 14

thats ok in my config…

by the way, how to indent here on the forum ? tried preformated text but did not work…

There is a link describing how to format in the big blue box at the beginning of every topic.

My configuration also has a purge_interval, but I don’t know if that is required

recorder:
  purge_interval: 1
  purge_keep_days: 3
  exclude:
    domains:
      - weblink
      - updater

Added purge_interval and i have no more error.
Thanks.

The component doc contains an error: https://home-assistant.io/components/recorder/#purge_interval is marked as optional but it is not…

Now waiting to see if purge is effectively performed.

1 Like

Thanks!
It’s still required in v114, but not even listed doc linked to above.