Skip to content

Add support for AirVisual Node/Pro units #32815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Apr 22, 2020

Conversation

bachya
Copy link
Contributor

@bachya bachya commented Mar 14, 2020

Proposed change

This PR adds support for AirVisual Node/Pro units to the airvisual integration. The integration talks to the device locally via Samba.

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:
  ip_address: 192.168.1.101
  password: 12345

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

@bachya bachya self-assigned this Mar 14, 2020
@bachya bachya changed the title Add support for AirVisual Node Pro units Add support for AirVisual Node/Pro units Mar 14, 2020
@bachya bachya changed the title Add support for AirVisual Node/Pro units WIP: Add support for AirVisual Node/Pro units Mar 14, 2020
@bachya
Copy link
Contributor Author

bachya commented Mar 14, 2020

Marking this as WIP because just as I finished it, I learned that I may be able to access the data locally... 😱 Although the PR will be very similar, there is enough of a change that I'm going to close this one and will re-approach.

@bachya bachya closed this Mar 14, 2020
@bachya bachya reopened this Mar 15, 2020
@bachya bachya changed the title WIP: Add support for AirVisual Node/Pro units Add support for AirVisual Node/Pro units Mar 15, 2020
@bachya
Copy link
Contributor Author

bachya commented Mar 15, 2020

Re-opening, as the work wasn't as bad as I'd anticipated.

@MartinHjelmare
Copy link
Member

Please rebase to solve the merge conflicts.

@bachya
Copy link
Contributor Author

bachya commented Apr 1, 2020

@MartinHjelmare It's on my to-do list. 👍

@bachya bachya force-pushed the airvisual-pro branch 3 times, most recently from 44f0755 to 53baaf1 Compare April 8, 2020 22:58
@balloob
Copy link
Member

balloob commented Apr 16, 2020

Rebasing still on to-do list?

@bachya
Copy link
Contributor Author

bachya commented Apr 16, 2020

@balloob I've rebased it twice thus far; since it's been hanging out, there have been ongoing changes in dev. Will push it again today.

EDIT: ended up being pretty simple. 👍

@bachya bachya force-pushed the airvisual-pro branch 2 times, most recently from 6e56c48 to bf2fb54 Compare April 20, 2020 01:01
@bachya
Copy link
Contributor Author

bachya commented Apr 20, 2020

I know ADR-0010 has been approved since I originally created this; do I need to rip out configuration.yaml support here? Or subsequent PR?

@MartinHjelmare
Copy link
Member

MartinHjelmare commented Apr 20, 2020

We don't want to add more things to the config yaml. We also don't want to remove the config yaml without a deprecation period.

Just add the new options to the config flow and leave the config yaml schema untouched, I think.

@bachya
Copy link
Contributor Author

bachya commented Apr 20, 2020

Thanks, @MartinHjelmare. Going to move this to a draft in the meantime; no reason to review until it's fully ready.

@bachya bachya marked this pull request as draft April 20, 2020 01:21
@bachya
Copy link
Contributor Author

bachya commented Apr 20, 2020

It ended up being pretty easy to remove configuration.yaml support for this new functionality (pushed via 795190b). Good for review.

@bachya bachya marked this pull request as ready for review April 20, 2020 02:06
Copy link
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.

Looks good! Just a small comment.

Copy link
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.

Nice!

@MartinHjelmare MartinHjelmare merged commit 4d292c2 into home-assistant:dev Apr 22, 2020
@bachya bachya deleted the airvisual-pro branch April 22, 2020 23:55
@lock lock bot locked and limited conversation to collaborators Apr 25, 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