-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
TP-Link Omada integration #81223
TP-Link Omada integration #81223
Conversation
6b295d5
to
a293cf2
Compare
I cocked up the tests for the first run of the workflow. It should be fixed in the last commit. Rebased to the top of dev now. |
a293cf2
to
6edb2e5
Compare
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.
This looks great! Left a couple of comments 🐬
Thanks for the detailed feedback. I'll look to implement the changes soon. |
I know that it is soon, and we didn't respond to this PR for a long time (sorry!), but if you implement your changes before Wednesday noon EST, I will try to get it into the beta and February release 👍 |
Sorry, it was a busy week for me so this wasn't possible. I should have the changes implemented this weekend. |
6edb2e5
to
1c6d443
Compare
Oh, I really ought to fix the tests before pushing. I forgot it goes straight into the PR. |
3403af7
to
834b584
Compare
I had to bump the |
isort is already on 5.12.0 in |
That will also fix the hassfest error as you can run that to generate the right file content after rebasing. |
Support for PoE config of network switch ports
834b584
to
8eff4a3
Compare
Hmm. I'm not sure what I'm missing. I rebased onto |
Ok, I think that's done it - I ran hassfest manually and it made a change to Also, it looks like the So the branch looks like it's coming off the right point now, and will hopefully pass the CI this time :) |
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.
Looks good, almost there!
Thanks for picking up these problems. Hopefully it's good to go now. |
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.
So close. Looks like re-auth is not tested
async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult: | ||
"""Perform reauth upon an API authentication error.""" | ||
self._omada_opts = dict(entry_data) | ||
return await self.async_step_reauth_confirm() |
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.
looks like it's missing a test for re-auth
🐬 🎉 💯 |
* TP-Link Omada integration Support for PoE config of network switch ports * Bump omada client version * Fixing tests * Refactored site config flow * Code review comments * Fixed tests and device display name issue * Bump isort to fix pre-commit hooks * Hassfest for the win * Omada code review * Black * More config flow test coverage * Full coverage for omada config_flow --------- Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Basic TP-Link Omada SDN Controller integration.
Proposed change
TP-Link Omada SDN has a suite of managed devices controlled by a software or hardware controller. The API for this allows configuration and monitoring of the SDN. The SDN has some fairly powerful features, which I don't propose to expose in HA. We'll only expose basic status and configuration - i.e. things that might be used in automations.
The integration adds a device for every network switch managed by the controller, and adds a toggle switch entity for each network port with PoE capability.
Currently this integration only supports PoE config of network switch ports (as the instructions said not to add multiple domains in the first PR). I will be adding features to add sensors for monitoring switches (port speed, connectivity, PoE power drain, etc..) and wifi access points, plus device tracking on the WiFi access points. Entities will share a small number of coordinators which will poll the Omada API for updates.
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
.To help with the load of incoming pull requests: