core
core copied to clipboard
Use aiohasupervisor for addon info calls
Proposed change
Begin the process of replacing hassio/handler with a published client library on pip in aiohasupervisor. As this is our guidance to all other integration developers, our supervisor integration should follow this as well.
Since the hassio component's internal library is used all over integrations for access to supervisor information replacing handler will likely take a good number of PRs. This PR seeks only to replace the method used for obtaining addon info with the equivalent method from the library.
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)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [x] Code quality improvements to existing code or addition of tests
Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request:
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
- [ ] I have followed the perfect PR recommendations
- [ ] The code has been formatted using Ruff (
ruff format homeassistant tests) - [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
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 runningpython3 -m script.gen_requirements_all. - [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
To help with the load of incoming pull requests:
- [ ] I have reviewed two other open pull requests in this repository.
Not sure how the errors in the hassio/issues tests didn't show up when I was running them locally but I'll fix those. The bluetooth ones I'm seeing the same failures when I switch to dev branch locally so I don't think those are a result of this PR? Will circle back.
I'm going to call this ready for review. Yes there is a failure in a test in the Plugwise integration but the test appears to be flaky. I ran it locally against dev branch and it failed 2 times in 10 with no changes in between. I opened #126086 for it.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:
Hi, I just did a fresh installation of HA core from dev using script/setup and got a missing import error for aiohasupervisor. I think this PR is the cause although I'm not clear why a core install loads hassio as I thought that was the supervisor.
We're aware and a solution is under way.
The missing import problem should be solved by: https://github.com/home-assistant/core/pull/126225