Watts: add HVAC action + preset mode#169546
Watts: add HVAC action + preset mode#169546theobld-ww wants to merge 10 commits intohome-assistant:devfrom
Conversation
…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>
|
Hey there @devender-verma-ww, @ssi-spyro, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
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
visionpluspythonfrom1.0.2to1.1.0and adjustget_device()usage accordingly. - Add
hvac_actionreporting and preset mode support to the Watts climate entity (including translations/icons updates). - Add a new
watts.activate_timer_modeentity 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. |
Co-authored-by: Copilot <copilot@github.com>
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
It might be cool to split the new action from the hvac action and preset mode mapping, as that seems different |
| _attr_supported_features = ( | ||
| ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE | ||
| ) | ||
| _attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF, HVACMode.AUTO] | ||
| _attr_preset_modes = PRESET_MODES |
Breaking change
Proposed change
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: