Skip to content

Fix is_closed state for SlidingDiscreteGateWithPedestrianPosition covers in Overkiz #170913

Merged
iMicknl merged 2 commits into
home-assistant:devfrom
iMicknl:fix-overkiz-sliding-discrete-gate-pedestrian-position
May 16, 2026
Merged

Fix is_closed state for SlidingDiscreteGateWithPedestrianPosition covers in Overkiz #170913
iMicknl merged 2 commits into
home-assistant:devfrom
iMicknl:fix-overkiz-sliding-discrete-gate-pedestrian-position

Conversation

@iMicknl
Copy link
Copy Markdown
Member

@iMicknl iMicknl commented May 16, 2026

Proposed change

The #141330 refactor caused unintended side effects for the SlidingDiscreteGateWithPedestrianPosition cover.

Add a widget override for SlidingDiscreteGateWithPedestrianPosition so it reads core:OpenClosedPedestrianState instead of falling through to the UIClass.GATE default (core:OpenClosedState), which this device does not report.

Also adds a fixture and test coverage for the io:SlidingDiscreteGateOpenerIOComponent device (Somfy Elixo 3S io).

Fixes #170259

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 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 2 commits May 16, 2026 15:26
…n Overkiz

The SlidingDiscreteGateWithPedestrianPosition widget reports
core:OpenClosedPedestrianState instead of core:OpenClosedState.
Without a dedicated override, it falls through to the UIClass.GATE
default which looks for core:OpenClosedState—a state this device
does not have—resulting in is_closed always being None.

Fixes home-assistant#170259
Copilot AI review requested due to automatic review settings May 16, 2026 15:37
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

Fixes incorrect is_closed reporting for Overkiz SlidingDiscreteGateWithPedestrianPosition covers by applying a widget-specific override so the entity reads core:OpenClosedPedestrianState (instead of falling back to the UIClass.GATE default core:OpenClosedState).

Changes:

  • Add a UIWidget.SLIDING_DISCRETE_GATE_WITH_PEDESTRIAN_POSITION cover description override to use OverkizState.CORE_OPEN_CLOSED_PEDESTRIAN for is_closed.
  • Extend Overkiz cover service-action tests to cover the sliding discrete gate device.
  • Add a real-device fixture entry (Somfy Elixo 3S io) and update snapshots impacted by the new fixture device/entities.

Reviewed changes

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

Show a summary per file
File Description
homeassistant/components/overkiz/cover.py Adds widget-level cover description override so is_closed reads the correct Overkiz state for sliding discrete gates with pedestrian position.
tests/components/overkiz/test_cover.py Adds a sliding gate fixture and includes it in cover open/close/stop service-action coverage.
tests/components/overkiz/fixtures/setup/cloud_somfy_tahoma_v2_europe.json Adds fixture data for an io:SlidingDiscreteGateOpenerIOComponent using SlidingDiscreteGateWithPedestrianPosition.
tests/components/overkiz/snapshots/test_cover.ambr Updates snapshot to include the new cover.sliding_gate entity/state (including is_closed).
tests/components/overkiz/snapshots/test_button.ambr Updates snapshot to include the new identify button entity created for the added fixture device.

@iMicknl iMicknl added this to the 2026.5.3 milestone May 16, 2026
@iMicknl iMicknl merged commit ad9a7c0 into home-assistant:dev May 16, 2026
33 checks passed
Copilot AI pushed a commit to AlCalzone/homeassistant-core that referenced this pull request May 17, 2026
…ers in Overkiz (home-assistant#170913)

Co-authored-by: AlCalzone <17641229+AlCalzone@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators May 17, 2026
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.

is_closed state is unknown for Gate/SlidingDiscreteGateWithPedestrianPosition after 2026.5.1 in Overkiz

4 participants