Recorder configuration error


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

  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

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

   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

  purge_interval: 1
  purge_keep_days: 3
      - weblink
      - updater

Added purge_interval and i have no more error.

The component doc contains an error: is marked as optional but it is not…

Now waiting to see if purge is effectively performed.

1 Like

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