Skip to content

Watts: add timer mode service#169846

Merged
joostlek merged 10 commits into
home-assistant:devfrom
theobld-ww:watts-timer-service
May 11, 2026
Merged

Watts: add timer mode service#169846
joostlek merged 10 commits into
home-assistant:devfrom
theobld-ww:watts-timer-service

Conversation

@theobld-ww
Copy link
Copy Markdown
Contributor

@theobld-ww theobld-ww commented May 5, 2026

Breaking change

Proposed change

  • Adds an activate_timer_mode service action to the Watts Vision climate entity. The action sets the thermostat into timer mode with a specified target temperature and duration
  • Depends on visionpluspython >= 1.1.0, should be merged after the version bump PR Bump visionpluspython 1.0.2 to 1.1.0 #169842

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:

@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented May 5, 2026

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 adds a new watts.activate_timer_mode service for Watts Vision thermostats, allowing users to switch a thermostat into “timer mode” with a target temperature and duration, and updates the integration to align with the upstream client API change for get_device.

Changes:

  • Add activate_timer_mode platform entity service wired to a new WattsVisionClimate.async_activate_timer_mode method.
  • Add user-facing service metadata (services.yaml, strings.json, icons.json) and integration setup to register the service.
  • Update coordinator/tests to reflect the updated visionpluspython get_device() signature and add tests for the new service.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/components/watts/test_switch.py Updates fast-polling assertion to match updated get_device() call signature.
tests/components/watts/test_climate.py Adds tests for the new timer mode service and updates fast-polling assertion for get_device().
homeassistant/components/watts/strings.json Adds translated exception messages and service metadata for activate_timer_mode.
homeassistant/components/watts/services.yaml Declares the new service and its UI selectors/fields.
homeassistant/components/watts/services.py Registers the new platform entity service and validates duration input shape/range.
homeassistant/components/watts/icons.json Adds an icon for the new service.
homeassistant/components/watts/coordinator.py Removes the refresh=True argument from get_device() calls.
homeassistant/components/watts/const.py Adds constants for the new service and its duration field.
homeassistant/components/watts/climate.py Implements async_activate_timer_mode with validation, error translation, fast polling, and refresh.
homeassistant/components/watts/init.py Registers services during integration setup and adds config-entry-only schema.

Comment thread homeassistant/components/watts/services.yaml Outdated
Comment thread homeassistant/components/watts/climate.py Outdated
Comment thread homeassistant/components/watts/climate.py Outdated
Copilot AI review requested due to automatic review settings May 5, 2026 14:03
@theobld-ww theobld-ww force-pushed the watts-timer-service branch from 60381d4 to 316d360 Compare May 5, 2026 14:03
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 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread homeassistant/components/watts/climate.py Outdated
Comment thread homeassistant/components/watts/climate.py Outdated
Comment thread homeassistant/components/watts/services.yaml Outdated
Comment thread homeassistant/components/watts/__init__.py
theobld-ww and others added 2 commits May 5, 2026 14:38
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 14:39
@theobld-ww theobld-ww marked this pull request as draft May 5, 2026 14:39
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 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/watts/climate.py Outdated
Comment thread homeassistant/components/watts/climate.py Outdated
Copilot AI review requested due to automatic review settings May 11, 2026 07:09
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 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/watts/climate.py Outdated
theobld-ww and others added 3 commits May 11, 2026 14:32
# Conflicts:
#	homeassistant/components/watts/climate.py
#	homeassistant/components/watts/icons.json
#	tests/components/watts/test_climate.py
Copilot AI review requested due to automatic review settings May 11, 2026 14: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 8 out of 8 changed files in this pull request and generated no new comments.

@theobld-ww theobld-ww marked this pull request as ready for review May 11, 2026 15:01
Copilot AI review requested due to automatic review settings May 11, 2026 15:01
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 8 out of 8 changed files in this pull request and generated 2 comments.

Comment on lines +228 to +233
_LOGGER.debug(
"Successfully activated timer mode: %s%s for %d min on %s",
temperature,
self.temperature_unit,
duration_minutes,
self.device_id,
Comment on lines +3 to 8
from datetime import timedelta
import logging
from typing import Any

from visionpluspython.exceptions import WattsVisionError
from visionpluspython.models import ThermostatDevice, ThermostatMode
@joostlek
Copy link
Copy Markdown
Member

Please make sure you have the new docs PR ready :)

@theobld-ww
Copy link
Copy Markdown
Contributor Author

@joostlek doc PR added : home-assistant/home-assistant.io#45311

@joostlek joostlek merged commit eeca75b into home-assistant:dev May 11, 2026
33 checks passed
lmaertin pushed a commit to lmaertin/homeassistant-core that referenced this pull request May 11, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
raman325 added a commit to raman325/home-assistant that referenced this pull request May 12, 2026
…-timer

* upstream/dev:
  Bump infrared-protocols to 5.1.0 (home-assistant#170365)
  Clean up template engine after extension modularization (home-assistant#170346)
  Bump axis to v71 (home-assistant#170347)
  Enhance WebDAV metadata download with concurrency (home-assistant#170223)
  Add target temperature sensor for ViCare RadiatorActuator devices (home-assistant#170102)
  Bump pyzbar to 0.1.9 (home-assistant#170076)
  homematicip_cloud: fix HmIP-FLC lock state polarity (home-assistant#170159)
  Watts: add timer mode service (home-assistant#169846)
  Set parallel updates for Ecowitt platforms (home-assistant#170349)
  Add config flow to Avea (home-assistant#168070)
  Cleanup Eurotronic number platform (home-assistant#170337)
  Add number platform to eurotronic_cometblue (home-assistant#168119)
@github-actions github-actions Bot locked and limited conversation to collaborators May 12, 2026
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