Fix is_closed state and position for DynamicPergola covers in Overkiz#170983
Merged
zweckj merged 8 commits intoMay 18, 2026
Conversation
The DynamicPergola widget uses core:OpenClosedState and core:ClosureState, unlike bioclimatic pergolas that use core:SlatsOpenClosedState. Without a widget-level override, the UIClass.PERGOLA fallback looked for slats state that doesn't exist on this device, causing the cover to report unknown state. Fixes home-assistant#170812
The slats-based behavior (core:SlatsOpenClosedState, tilt orientation) is specific to BioclimaticPergola devices. Make the UIClass.PERGOLA default use the simpler core:OpenClosedState and core:ClosureState which works for DynamicPergola and other standard pergola widgets.
Ensures the deployment-based pergola awning widget has snapshot coverage to prevent regressions when changing the UIClass.PERGOLA default.
Ensures the deployment-based pergola awning widget has snapshot coverage to prevent regressions when changing the UIClass.PERGOLA default.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Overkiz pergola cover state/position handling by updating the Pergola UIClass defaults to use core:OpenClosedState + core:ClosureState, while adding a widget-specific override to preserve the existing bioclimatic pergola (slats/tilt) behavior.
Changes:
- Update
UIClass.PERGOLAmapping to usecore:OpenClosedStateforis_closedandcore:ClosureStatefor position. - Add a
UIWidget.BIOCLIMATIC_PERGOLAoverride to keep slats open/closed + orientation (tilt-only) support. - Extend Overkiz test fixtures and service/snapshot coverage for
DynamicPergolaandPergolaHorizontalAwning.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
homeassistant/components/overkiz/cover.py |
Adjusts pergola description defaults and adds a bioclimatic-pergola widget override to avoid “unknown” cover state. |
tests/components/overkiz/test_cover.py |
Adds new fixture devices and service-action assertions for dynamic pergola + pergola horizontal awning. |
tests/components/overkiz/fixtures/setup/cloud_somfy_tahoma_v2_europe.json |
Adds device definitions/states for the new pergola devices used by tests. |
tests/components/overkiz/snapshots/test_cover.ambr |
Updates snapshots to reflect the new devices and revised pergola state/position behavior. |
DYNAMIC_PERGOLA and PERGOLA_HORIZONTAL_AWNING use the same fixture file as SHUTTER, so adding them to SNAPSHOT_FIXTURES caused redundant snapshot runs with unstable json0/json1/json2 IDs.
The PergolaHorizontalAwning and PergolaHorizontalAwningUno widget descriptions were missing stop_command, causing the stop button to not appear in the UI despite the device supporting the stop command. Fixes home-assistant#171014
21 tasks
zweckj
approved these changes
May 18, 2026
jnimmo
pushed a commit
to jnimmo/core
that referenced
this pull request
May 18, 2026
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
The DynamicPergola widget uses core:OpenClosedState and core:ClosureState, unlike bioclimatic pergolas that use core:SlatsOpenClosedState. Without a widget-level override, the UIClass.PERGOLA fallback looked for slats state that doesn't exist on this device, causing the cover to report unknown state.
Fixes #170812
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: