Skip to content

Add Watts Vision + integration with tests#153022

Merged
joostlek merged 65 commits into
home-assistant:devfrom
theobld-ww:watts_vision
Dec 18, 2025
Merged

Add Watts Vision + integration with tests#153022
joostlek merged 65 commits into
home-assistant:devfrom
theobld-ww:watts_vision

Conversation

@theobld-ww
Copy link
Copy Markdown
Contributor

Breaking change

Proposed change

  • Add official Watts Vision + core integration
  • Unit tests

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

Copilot AI review requested due to automatic review settings September 26, 2025 08:08
Copy link
Copy Markdown
Contributor

@home-assistant home-assistant Bot left a comment

Choose a reason for hiding this comment

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

Hi @theobld-ww

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@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.

@home-assistant home-assistant Bot marked this pull request as draft September 26, 2025 08:08
Copy link
Copy Markdown
Contributor

@home-assistant home-assistant Bot left a comment

Choose a reason for hiding this comment

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

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

Adds a new Watts Vision+ integration for Home Assistant that allows users to control Watts Vision+ heating devices through OAuth2 authentication. The integration supports thermostat control (temperature adjustment, HVAC modes) and switch operations.

Key changes:

  • OAuth2-based authentication system for secure API access
  • Data coordinator for efficient device management and updates
  • Climate and switch platform implementations for device control

Reviewed Changes

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

Show a summary per file
File Description
homeassistant/components/watts/init.py Main integration setup with OAuth2 session management and platform registration
homeassistant/components/watts/config_flow.py OAuth2 configuration flow implementation
homeassistant/components/watts/coordinator.py Data update coordinator for device discovery and state management
homeassistant/components/watts/climate.py Climate platform for thermostat device control
homeassistant/components/watts/switch.py Switch platform for switch device control
homeassistant/components/watts/entity.py Base entity class with common device information handling
homeassistant/components/watts/auth.py OAuth2 authentication wrapper
homeassistant/components/watts/application_credentials.py OAuth2 server configuration
homeassistant/components/watts/const.py Integration constants and mappings
homeassistant/components/watts/manifest.json Integration metadata and requirements
homeassistant/components/watts/strings.json UI text strings for configuration flows
homeassistant/components/watts/quality_scale.yaml Quality scale compliance tracking
tests/components/watts/* Comprehensive test suite covering all components
requirements_all.txt & requirements_test_all.txt Added visionpluspython==1.0.0 dependency
CODEOWNERS Added maintainers for the new integration

Comment thread homeassistant/components/watts/coordinator.py
@theobld-ww theobld-ww marked this pull request as ready for review September 26, 2025 09:31
@home-assistant home-assistant Bot dismissed stale reviews from themself September 26, 2025 09:31

Stale

Comment thread homeassistant/components/watts/__init__.py Outdated
Comment thread homeassistant/components/watts/__init__.py
Comment thread homeassistant/components/watts/__init__.py Outdated
Comment thread homeassistant/components/watts/__init__.py Outdated
Comment thread homeassistant/components/watts/__init__.py Outdated
Comment thread homeassistant/components/watts/manifest.json
Comment thread homeassistant/components/watts/quality_scale.yaml
@home-assistant home-assistant Bot marked this pull request as draft September 26, 2025 10:27
theobld-ww and others added 2 commits September 29, 2025 08:46
Update DataUpdateCoordinator to use explicit config_entry parameter
@theobld-ww theobld-ww requested a review from joostlek September 29, 2025 09:07
@theobld-ww theobld-ww marked this pull request as ready for review September 29, 2025 09:07
@theobld-ww theobld-ww requested a review from Copilot September 29, 2025 11:12
@theobld-ww
Copy link
Copy Markdown
Contributor Author

Reminder, if it's ready for review, please press the button to mark it as such

integration updated to reach Platinum level, now it's ready for review, thank you !
I also adjusted the code to be more specific to thermostat devices, since we plan to add support for switch devices shortly after. The current visionpluspython library supports both thermostats and switches, so I re-added the isinstance check to handle them safely. Please let me know if there’s a cleaner way to do this.

@theobld-ww theobld-ww marked this pull request as ready for review December 18, 2025 13:37
@home-assistant home-assistant Bot requested a review from joostlek December 18, 2025 13:37
@theobld-ww theobld-ww requested a review from Copilot December 18, 2025 13:38
@joostlek
Copy link
Copy Markdown
Member

Going for platinum in the initial PR probably isn't the way to go as it will add things we don't want in the initial PR. I will give it a pass now, feel free to send me a message on Discord

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 28 out of 31 changed files in this pull request and generated 1 comment.

Comment thread tests/components/watts/test_climate.py Outdated
Comment thread homeassistant/components/watts/__init__.py Outdated
Comment thread homeassistant/components/watts/quality_scale.yaml Outdated
Comment thread homeassistant/components/watts/coordinator.py Outdated
Comment thread homeassistant/components/watts/coordinator.py Outdated
Comment thread tests/components/watts/conftest.py Outdated
Comment thread tests/components/watts/conftest.py Outdated
Comment thread tests/components/watts/test_config_flow.py Outdated
Comment thread tests/components/watts/test_config_flow.py
@home-assistant home-assistant Bot marked this pull request as draft December 18, 2025 14:22
@theobld-ww theobld-ww marked this pull request as ready for review December 18, 2025 15:11
@home-assistant home-assistant Bot requested a review from joostlek December 18, 2025 15:11
Comment thread homeassistant/components/watts/quality_scale.yaml Outdated
theobld-ww and others added 2 commits December 18, 2025 16:32
@joostlek joostlek merged commit c2440c4 into home-assistant:dev Dec 18, 2025
62 of 63 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 19, 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