-
-
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 new integration for WMS WebControl pro using local API #124176
Conversation
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.
Is this a must or a should? I am asking this, because I tried to limit the amount of platforms/devices to a useful minimum for the initial PR. Which platform should I keep to introduce this integration to Home Assistant? Human reviewers, please consider that the WMS WebControl pro is a hub/gateway with support for various devices types, similar to Homematic IP for example. |
7d55c56
to
e3529bb
Compare
Okay, I just updated this PR to only include support for scenes for now. |
91db70c
to
5c7358a
Compare
I'd recommend using a stateful platform first like light or cover |
I will follow up with cover and light in separate PRs since I have it ready locally, but scenes would allow at least versatile indirect control already. |
Yes, but handling a state in your integration is probably the most interesting part which also defines how your data flows between entities, while a scene is just something you can turn on. So I'd rather pick a more complex one to make sure we make the best choices to keep the integration extendable and efficient |
Ok, will do the change then. Adding more than one platform is not an option right? Because I have lights, awnings and scenes fully working. Rotating PR content and documentation is quite cumbersome. |
Switched the PR from scenes to awnings as covers now.
The cover platform now shows how core/homeassistant/components/wmspro/generic_entity.py Lines 13 to 51 in 3a67cda
|
ef7cbbd
to
f1f21d0
Compare
The PR has reached 100% test coverage now 🎉 |
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
d34613c
to
f9a2408
Compare
Okay, I tried to incorporate more feedback. Can you please elaborate which of the parts regarding a) different mocking, b) parameterized tests and c) snapshot tests would be important/required to get this merged? And of course I am now also curious why the cover component needs to be explicitly loaded/setup. But I am done for today. |
Understandable, have a good night, I will probably check the code out tomorrow. Do you have discord? |
Yes, I am on Discord with the same username, just pinged you there. Have a good night, too. Question to consider regarding the mocking for tomorrow: would it be okay if With that I mean, I could move the JSON fixtures there (since I will need to develop tests there anyway), add a simulation mode to the library classes and then use that during testing in HA. |
552c66c
to
db6a8b9
Compare
I have now implemented everything except the requested complete change of mocking approach. If the main reason for the requested mock style is to not touch library internals in HA tests, I would suggest to move this type of simulated mocking into the library as described above. This way end-to-end tests could be simulated. |
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.
Last comments
Warema recently released a new local API for their WMS hub called "WebControl pro". This integration makes use of the new local API via a new dedicated Python library pywmspro. For now this integration only supports awnings as covers. But pywmspro is device-agnostic to ease future extensions.
Thanks a lot!
Thanks a lot!
Thanks a lot!
Thanks a lot @joostlek ! |
Ugh, I always realize this too late. Let me double check if others think |
Ah, good point. Alternatives could be "wmswebcontrolpro", "webcontrolpro", "warema_wms" or any more detailed combination of "Warema" as vendor, "WMS" as protocol and "WebControl pro" as required hub. |
…stant#124176) * Add new integration for WMS WebControl pro using local API Warema recently released a new local API for their WMS hub called "WebControl pro". This integration makes use of the new local API via a new dedicated Python library pywmspro. For now this integration only supports awnings as covers. But pywmspro is device-agnostic to ease future extensions. * Incorporated review feedback from joostlek Thanks a lot! * Incorporated more review feedback from joostlek Thanks a lot! * Incorporated more review feedback from joostlek Thanks a lot! * Fix * Follow-up fix * Improve handling of DHCP discovery * Further test improvements suggested by joostlek, thanks! --------- Co-authored-by: Joostlek <joostlek@outlook.com>
Proposed change
Warema recently released a new local API for their WMS hub called "WebControl pro". This integration makes use of the new local API via a new dedicated Python library pywmspro.
For now this integration only supports awnings as covers, but pywmspro is device-agnostic to ease extensions. I will try to add support for more devices in future PRs. I have already developed and tested lights and scenes locally.
Python library: https://github.com/mback2k/pywmspro and https://pypi.org/project/pywmspro/
Official API documentation, unfortunately only available in German at the moment:
https://media.warema.com/dokumente/anleitungen-handbuecher/966664/warema_2064534_alhb_de_v0.pdf
Type of change
Additional information
Checklist
ruff format 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
.To help with the load of incoming pull requests: