Add support for load switches to WMS WebControl pro#151047
Add support for load switches to WMS WebControl pro#151047joostlek merged 2 commits intohome-assistant:devfrom
Conversation
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
|
I will get back to this soon. |
c51a2d9 to
e6ab10b
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for load-bearing switches (such as heaters) to the WMS WebControl pro integration. The implementation follows the existing patterns established in the integration for other device types like lights and covers.
Key Changes:
- New switch platform for controlling load switches via the WMS WebControl pro API
- Comprehensive test coverage including device creation, state updates, and on/off control
- Test fixtures to support the new switch functionality
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/wmspro/__init__.py |
Adds Platform.SWITCH to the list of supported platforms |
homeassistant/components/wmspro/switch.py |
Implements the switch platform with entity setup and on/off control methods, following the same patterns as the light platform |
tests/components/wmspro/test_switch.py |
Adds comprehensive tests for switch device creation, state updates, and service calls (turn on/off) |
tests/components/wmspro/conftest.py |
Adds test fixtures for load switch configuration and status mocking |
tests/components/wmspro/fixtures/config_prod_load_switch.json |
Provides test configuration data including heater devices with load switch actions |
tests/components/wmspro/fixtures/status_prod_load_switch.json |
Provides test status data for load switch state verification |
tests/components/wmspro/snapshots/test_switch.ambr |
Snapshot assertions for device registry and entity state verification |
|
Happy holidays @joostlek, would you mind taking a look at this for people wanting to control their heaters? Thanks in advance! |
|
Thanks a lot, @joostlek ! |
Proposed change
Add support for load switches (e.g. controlling heaters) to WMS WebControl pro, see:
mback2k/pywmspro#1 (comment)
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: