Skip to content

Add tests for scene platform in Overkiz#170993

Open
iMicknl wants to merge 3 commits into
home-assistant:devfrom
iMicknl:add-overkiz-scene-tests
Open

Add tests for scene platform in Overkiz#170993
iMicknl wants to merge 3 commits into
home-assistant:devfrom
iMicknl:add-overkiz-scene-tests

Conversation

@iMicknl
Copy link
Copy Markdown
Member

@iMicknl iMicknl commented May 17, 2026

Proposed change

Add tests covering the scene entity setup and activation using real fixtures.

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

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:

iMicknl added 3 commits May 17, 2026 16:16
Add tests covering the scene entity setup and activation using
real fixture data from the python-overkiz-api test suite.
Parametrize the snapshot test across all four real fixtures from
python-overkiz-api: cozytouch, tahoma_box_v1, tahoma_classic_v2,
and tahoma_switch.
Keep only cozytouch (multiple scenarios) and tahoma_switch (single
scenario with special characters) since the scene entity has no
branching logic based on actions or device types.
Copilot AI review requested due to automatic review settings May 17, 2026 16:30
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 automated test coverage for the Overkiz scene platform, validating entity creation from real scenario fixtures and ensuring scene activation calls the expected client API.

Changes:

  • Add snapshot-based tests to verify scene entities are created correctly from multiple scenario fixtures.
  • Add service-call tests to verify scene.turn_on triggers execute_scenario with the correct scenario OID(s).
  • Add Overkiz scenario JSON fixtures and corresponding Syrupy snapshots.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/components/overkiz/test_scene.py New tests covering scene entity setup (snapshots) and activation behavior (service calls).
tests/components/overkiz/snapshots/test_scene.ambr New snapshots for entity registry entries and states created from scenario fixtures.
tests/components/overkiz/fixtures/scenarios/tahoma_switch.json Adds scenario fixture data for TaHoma Switch to drive scene tests.
tests/components/overkiz/fixtures/scenarios/cozytouch.json Adds scenario fixture data for Cozytouch to drive scene tests (multiple scenes).

@iMicknl iMicknl marked this pull request as ready for review May 17, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants