Skip to content

Allow zero purge_interval to disable recorder purge#12220

Merged
balloob merged 1 commit intohome-assistant:devfrom
amelchio:recorder-zero-interval
Feb 8, 2018
Merged

Allow zero purge_interval to disable recorder purge#12220
balloob merged 1 commit intohome-assistant:devfrom
amelchio:recorder-zero-interval

Conversation

@amelchio
Copy link
Copy Markdown
Contributor

@amelchio amelchio commented Feb 6, 2018

Description:

This was suggested in #11976 (comment) as an easy way to disable recorder purge, now that purging soon becomes the default.

It turns out that we still have the code to disable purging if purge_interval is falsy. It was a leftover from when purge_interval could be None so maybe I subconsciously anticipated this suggestion :)

So this PR just includes zero in the allowed range.

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#4591

Example entry for configuration.yaml (if applicable):

recorder:
  purge_interval: 0

Checklist:

  • The code change is tested and works locally.

If user exposed functionality or configuration variables are added/changed:

If the code does not interact with devices:

  • Local tests with tox run successfully.
  • Tests have been added to verify that the new code works.

@balloob balloob merged commit 9456062 into home-assistant:dev Feb 8, 2018
@balloob balloob mentioned this pull request Feb 9, 2018
@amelchio amelchio mentioned this pull request Feb 10, 2018
4 tasks
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants