-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Add Awair Local API support #75535
Add Awair Local API support #75535
Conversation
Hey there @ahayworth, @danielsjf, mind taking a look at this pull request as it has been labeled with an integration ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 🎉
Yes, I think this is the right approach. I keep thinking "gosh, we should really come back to the local api" but I've had approximately zero time/drive to do so. Thank you so much for taking up the charge!
I will reserve thorough review until it's marked as ready, but I do think the overall direction at the moment is correct.
Regarding mDNS discovery: yes, that can come later. In the future, I think we should have a flow that prefers local by default (and does mDNS discovery for you) but accepts an API token to still support the oldest generation devices. But like you proposed: we'll do that next. A list of hosts is a good next step and we need momentum to keep going. This gives us that momentum!
Thank you! Excited to review it when it's done! 😄
Slowly making some progress on this. Its summer so not too much free time.
|
d97e60c
to
25c871e
Compare
* Only patch when needed * Patch correct methods
I have more tests to add before this is done, but @ahayworth could you PTAL too, I'd appreciate your feedback on the state of the integration. |
* Don't catch exceptions caught elsewhere * elif to else
Great contribution, thanks! 🎉 |
@zachberger I think it's lovely. 😄 If you want to help maintain this component ... that's lovely too 😉 I don't have as much time for open source right now as I would like, and I don't want to be a blocker for further improvements! |
Thanks everyone for the help getting this across the line! |
Proposed change
Add support for Awair's (beta) Local API. This API supports more frequent polling and will work when there is no Internet connection.
Previous attempt in #39538 but that was introducing an entirely new integration. #39538#issuecomment-693547702 suggested extending the current awair component to add an option for the local API, which this new PR does. #39538 also suggested mDNS discovery, that is not in this PR, but could be explored and submitted in a future PR.
Still to be done:
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: