Skip to content

Add config entry for AirVisual#32072

Merged
bachya merged 32 commits intohome-assistant:devfrom
bachya:airvisual-config-entry
Feb 29, 2020
Merged

Add config entry for AirVisual#32072
bachya merged 32 commits intohome-assistant:devfrom
bachya:airvisual-config-entry

Conversation

@bachya
Copy link
Copy Markdown
Contributor

@bachya bachya commented Feb 21, 2020

Breaking change

The config schema for AirVisual has changed; users who configure AirVisual via configuration.yaml will need to update. Additionally, in order to protect the AirVisual cloud API, scan_interval is no longer configurable for this integration.

Proposed change

This PR adds a config entry for AirVisual. It does not include config options; that will come in a future PR.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
airvisual:
  api_key: !secret airvisual_api_key

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

@codecov

This comment has been minimized.

Copy link
Copy Markdown
Member

@Kane610 Kane610 left a comment

Choose a reason for hiding this comment

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

The PR could be simplified by splitting out the options flow and using default values

Comment thread homeassistant/components/airvisual/config_flow.py Outdated
Comment thread homeassistant/components/airvisual/config_flow.py Outdated
Comment thread homeassistant/components/airvisual/__init__.py Outdated
Comment thread homeassistant/components/airvisual/__init__.py Outdated
Comment thread homeassistant/components/airvisual/strings.json Outdated
Comment thread homeassistant/components/airvisual/config_flow.py Outdated
Comment thread homeassistant/components/airvisual/config_flow.py Outdated
Comment thread homeassistant/components/airvisual/config_flow.py Outdated
Comment thread homeassistant/components/airvisual/config_flow.py Outdated
Comment thread homeassistant/components/airvisual/config_flow.py
Comment thread homeassistant/components/airvisual/config_flow.py Outdated
Comment thread homeassistant/components/airvisual/sensor.py
@bachya bachya force-pushed the airvisual-config-entry branch 2 times, most recently from fb700f7 to f05a4bb Compare February 25, 2020 03:07
@bachya
Copy link
Copy Markdown
Contributor Author

bachya commented Feb 28, 2020

@Kane610 Anything else you want to see here?

Copy link
Copy Markdown
Member

@Kane610 Kane610 left a comment

Choose a reason for hiding this comment

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

Nearly there 👍

Comment thread homeassistant/components/airvisual/config_flow.py Outdated
Comment thread tests/components/airvisual/test_config_flow.py Outdated
@bachya bachya force-pushed the airvisual-config-entry branch from 3508adb to d8005fb Compare February 28, 2020 23:15
Copy link
Copy Markdown
Member

@Kane610 Kane610 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 👍🏻 Just one user step left in tests.

@bachya bachya merged commit e9a7b66 into home-assistant:dev Feb 29, 2020
Comment thread homeassistant/components/airvisual/config_flow.py
Comment thread tests/components/airvisual/test_config_flow.py
Comment thread tests/components/airvisual/test_config_flow.py
Comment thread tests/components/airvisual/test_config_flow.py
@bachya
Copy link
Copy Markdown
Contributor Author

bachya commented Feb 29, 2020

Thanks, @MartinHjelmare. I’m out of the country for a week; I’ll take care of these notes when I return.

@bachya bachya deleted the airvisual-config-entry branch March 9, 2020 20:55
@lock lock Bot locked and limited conversation to collaborators Mar 10, 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.

4 participants