Skip to content

Remove monitored conditions from OpenUV#31019

Merged
balloob merged 2 commits into
home-assistant:devfrom
bachya:openuv-remove-monitored-conditions
Jan 23, 2020
Merged

Remove monitored conditions from OpenUV#31019
balloob merged 2 commits into
home-assistant:devfrom
bachya:openuv-remove-monitored-conditions

Conversation

@bachya
Copy link
Copy Markdown
Contributor

@bachya bachya commented Jan 20, 2020

Breaking Change:

It is no longer possible to specify monitored conditions within the OpenUV integration; all entities are added by default.

Description:

Per ADR 0003, this PR removes the concept of monitored conditions from OpenUV. All entity types are added by default. The integration uses more than one API call, but since we update the entities via service call (and all service calls are available by default), I made the choice to include everything.

This PR also includes a config entry migration to clean up monitored conditions data as necessary.

Related issue (if applicable): N/A

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

Example entry for configuration.yaml (if applicable):

openuv:
  api_key: !secret openuv_api_key

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.
  • I have followed the development checklist

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

@bachya bachya force-pushed the openuv-remove-monitored-conditions branch from d645d34 to 226e904 Compare January 21, 2020 16:16
Comment thread homeassistant/components/openuv/__init__.py Outdated
UV_LEVEL_MODERATE = "Moderate"
UV_LEVEL_LOW = "Low"

SENSORS = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All the constants maybe into const.py inside integration?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I traditionally haven't done this; instead, I've followed the pattern used by HASS itself (centralize a constant into const.py if it is used in more than one place, otherwise define it where it is used). Should I not be doing that?

Comment thread homeassistant/components/openuv/__init__.py Outdated
@balloob balloob merged commit 288574b into home-assistant:dev Jan 23, 2020
@bachya bachya deleted the openuv-remove-monitored-conditions branch January 23, 2020 02:30
@lock lock Bot locked and limited conversation to collaborators Jan 24, 2020
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.

6 participants