Add tests for scene platform in Overkiz#170993
Open
iMicknl wants to merge 3 commits into
Open
Conversation
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.
Contributor
There was a problem hiding this comment.
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_ontriggersexecute_scenariowith 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Add tests covering the scene entity setup and activation using real fixtures.
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: