Skip to content

Watts: add HVAC action + preset mode#169546

Open
theobld-ww wants to merge 10 commits intohome-assistant:devfrom
theobld-ww:watts-hvac-preset-timer
Open

Watts: add HVAC action + preset mode#169546
theobld-ww wants to merge 10 commits intohome-assistant:devfrom
theobld-ww:watts-hvac-preset-timer

Conversation

@theobld-ww
Copy link
Copy Markdown
Contributor

@theobld-ww theobld-ww commented Apr 30, 2026

Breaking change

Proposed change

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

  • I understand the code I am submitting and can explain how it works.
  • 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.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

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 diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

theobld-ww and others added 3 commits April 30, 2026 09:19
…ation

- Implemented preset modes: comfort, eco, defrost, and timer.
- Added service to activate timer mode with temperature and duration.
- Updated constants and error handling for new features.
- Enhanced tests for preset mode and timer mode functionalities.
Co-authored-by: Copilot <copilot@github.com>
@home-assistant
Copy link
Copy Markdown
Contributor

Hey there @devender-verma-ww, @ssi-spyro, mind taking a look at this pull request as it has been labeled with an integration (watts) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of watts can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant mark-draft Mark the pull request as draft.
  • @home-assistant ready-for-review Remove the draft status from the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign watts Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant update-branch Update the pull request branch with the base branch.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

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 extends the watts integration’s climate support by exposing HVAC action reporting, adding preset modes (comfort/eco/defrost/timer), and introducing a timer activation service, alongside a visionpluspython dependency bump needed for the new device fields.

Changes:

  • Bump visionpluspython from 1.0.2 to 1.1.0 and adjust get_device() usage accordingly.
  • Add hvac_action reporting and preset mode support to the Watts climate entity (including translations/icons updates).
  • Add a new watts.activate_timer_mode entity service with selectors, translations, and tests.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
homeassistant/components/watts/climate.py Adds HVAC action, presets, and registers the new timer entity service.
homeassistant/components/watts/const.py Introduces preset/action mappings and timer-service constants.
homeassistant/components/watts/coordinator.py Updates get_device() call to match the new library signature.
homeassistant/components/watts/manifest.json Bumps visionpluspython requirement to 1.1.0.
requirements_all.txt Updates pinned dependency to visionpluspython==1.1.0.
requirements_test_all.txt Updates pinned test dependency to visionpluspython==1.1.0.
homeassistant/components/watts/services.yaml Defines selectors for the new activate_timer_mode service.
homeassistant/components/watts/strings.json Adds preset-mode state translations and new exception/service strings.
homeassistant/components/watts/icons.json Adds preset-mode icons and a service icon.
homeassistant/components/watts/quality_scale.yaml Marks entity/icon translations as done to reflect new translation assets.
tests/components/watts/test_climate.py Adds tests for HVAC action, preset setting, and timer activation; updates polling assertions.
tests/components/watts/test_switch.py Updates polling assertion to match new get_device() signature.
tests/components/watts/conftest.py Updates mocked get_device side effect signature.
tests/components/watts/fixtures/*.json Adds hvacAction fields to thermostat fixtures.
tests/components/watts/snapshots/test_climate.ambr Updates climate snapshots for new attributes/features/translation key.
tests/components/watts/snapshots/test_diagnostics.ambr Updates diagnostics snapshot to include hvac_action.

Comment thread homeassistant/components/watts/climate.py
Comment thread homeassistant/components/watts/climate.py Outdated
Co-authored-by: Copilot <copilot@github.com>
Comment thread homeassistant/components/watts/climate.py Outdated
Comment thread homeassistant/components/watts/const.py Outdated
Comment thread homeassistant/components/watts/const.py
Comment thread homeassistant/components/watts/manifest.json
Comment thread homeassistant/components/watts/services.yaml Outdated
Comment thread homeassistant/components/watts/strings.json Outdated
@home-assistant home-assistant Bot marked this pull request as draft April 30, 2026 17:46
@home-assistant
Copy link
Copy Markdown
Contributor

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@joostlek
Copy link
Copy Markdown
Member

It might be cool to split the new action from the hvac action and preset mode mapping, as that seems different

Copilot AI review requested due to automatic review settings May 5, 2026 08:57
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

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/watts/services.yaml Outdated
Comment thread homeassistant/components/watts/services.py Outdated
@theobld-ww theobld-ww changed the title Watts hvac preset timer Watts: add HVAC action + preset mode May 5, 2026
Copilot AI review requested due to automatic review settings May 5, 2026 11:50
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

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/watts/climate.py
Comment thread homeassistant/components/watts/climate.py
@theobld-ww theobld-ww marked this pull request as ready for review May 5, 2026 13:15
Copilot AI review requested due to automatic review settings May 5, 2026 13:15
@home-assistant home-assistant Bot requested a review from joostlek May 5, 2026 13: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

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Comment on lines +95 to +99
_attr_supported_features = (
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
)
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF, HVACMode.AUTO]
_attr_preset_modes = PRESET_MODES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants