Skip to content

Add support for load switches to WMS WebControl pro#151047

Merged
joostlek merged 2 commits intohome-assistant:devfrom
mback2k:wmspro-heaters
Dec 22, 2025
Merged

Add support for load switches to WMS WebControl pro#151047
joostlek merged 2 commits intohome-assistant:devfrom
mback2k:wmspro-heaters

Conversation

@mback2k
Copy link
Copy Markdown
Contributor

@mback2k mback2k commented Aug 22, 2025

Proposed change

Add support for load switches (e.g. controlling heaters) to WMS WebControl pro, see:
mback2k/pywmspro#1 (comment)

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)
  • Code quality improvements to existing code or addition of tests

Additional information

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:

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 running python3 -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:

@github-actions
Copy link
Copy Markdown

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.
If you are the author of this PR, please leave a comment if you want to keep it open. Also, please rebase your PR onto the latest dev branch to ensure that it's up to date with the latest changes.
Thank you for your contribution!

@github-actions github-actions Bot added the stale label Oct 21, 2025
@mback2k
Copy link
Copy Markdown
Contributor Author

mback2k commented Oct 21, 2025

I will get back to this soon.

@github-actions github-actions Bot removed the stale label Oct 21, 2025
@mback2k mback2k marked this pull request as ready for review December 8, 2025 21:15
Copilot AI review requested due to automatic review settings December 8, 2025 21:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread tests/components/wmspro/fixtures/config_prod_load_switch.json
@mback2k
Copy link
Copy Markdown
Contributor Author

mback2k commented Dec 22, 2025

Happy holidays @joostlek, would you mind taking a look at this for people wanting to control their heaters? Thanks in advance!

Comment thread homeassistant/components/wmspro/switch.py Outdated
@joostlek joostlek merged commit ca30d8b into home-assistant:dev Dec 22, 2025
36 checks passed
@mback2k
Copy link
Copy Markdown
Contributor Author

mback2k commented Dec 22, 2025

Thanks a lot, @joostlek !

@github-actions github-actions Bot locked and limited conversation to collaborators Dec 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants