Skip to content

Deprecate conf_update_interval#20924

Merged
MartinHjelmare merged 6 commits into
home-assistant:devfrom
rohankapoorcom:deprecate-conf-update-interval
Feb 17, 2019
Merged

Deprecate conf_update_interval#20924
MartinHjelmare merged 6 commits into
home-assistant:devfrom
rohankapoorcom:deprecate-conf-update-interval

Conversation

@rohankapoorcom
Copy link
Copy Markdown
Member

@rohankapoorcom rohankapoorcom commented Feb 10, 2019

Description:

As noticed in #20526 , CONF_UPDATE_INTERVAL and CONF_SCAN_INTERVAL serve identical purposes and CONF_SCAN_INTERVAL is used a lot more.

Now that we have a clean way to deprecate configs without causing breaking changes, (#20565) we can clean this up.

CONF_UPDATE_INTERVAL has been deprecated in 0.88 and is set to become invalid in 0.91 (three versions out). In 0.92, we can go ahead and do a final cleanup since all users should have migrated over by then.

Breaking Change: update_interval has been deprecated and replaced with scan_interval in all components and platforms. This is a soft deprecation in this release and will automatically become a hard breaking change in Home Assistant version 0.91.0.

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

I need to go through all of these components/platforms and update the documentation.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

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

Copy link
Copy Markdown
Contributor

@dgomes dgomes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment thread tests/components/sensor/test_darksky.py Outdated
Comment thread homeassistant/components/fastdotcom/__init__.py
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The platform schema already has CONF_SCAN_INTERVAL so we should not overwrite that key in platforms.

Comment thread homeassistant/components/sensor/broadlink.py Outdated
Comment thread homeassistant/components/sensor/darksky.py Outdated
Comment thread homeassistant/components/sensor/broadlink.py Outdated
Comment thread homeassistant/components/sensor/darksky.py Outdated
Comment thread homeassistant/components/sensor/fedex.py Outdated
Comment thread homeassistant/components/sensor/fedex.py Outdated
Comment thread homeassistant/components/sensor/ups.py Outdated
Comment thread homeassistant/components/sensor/ups.py Outdated
@MartinHjelmare
Copy link
Copy Markdown
Member

Is this a fix and that's why it should go into 0.88?

@rohankapoorcom
Copy link
Copy Markdown
Member Author

Is this a fix and that's why it should go into 0.88?

No, I'm trying to place all of the configuration deprecations in a single release (there's already one in 0.88) so that it easier for users to remember when the deprecations became forcibly invalid.

All changes addressed and pushed up.

@MartinHjelmare
Copy link
Copy Markdown
Member

Nice!

@MartinHjelmare MartinHjelmare merged commit 481439d into home-assistant:dev Feb 17, 2019
@ghost ghost removed the in progress label Feb 17, 2019
@rohankapoorcom rohankapoorcom deleted the deprecate-conf-update-interval branch February 17, 2019 05:41
balloob pushed a commit that referenced this pull request Feb 17, 2019
* Deprecate update_interval and replace with scan_interval

* Update tests

* Fix Darksky tests

* Fix Darksky tests correctly

This reverts commit a73384a.

* Provide the default for the non deprecated option

* Don't override default schema for sensors
@balloob balloob mentioned this pull request Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants