Skip to content

Conversation

@iMicknl
Copy link
Member

@iMicknl iMicknl commented Jan 3, 2026

Proposed change

Diagnostics in Overkiz list the execution history. Device diagnostics filter these executions by the selected device, but the subsystem device was not taken into account. This change matches the device URL without considering the subsystem ID.

Device URL format: <protocol>://<gatewayId>/<deviceAddress>[#<subsystemId>]

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

Copy link
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

This PR fixes a bug in the Overkiz integration's device diagnostics where execution history filtering failed to match commands from subsystem devices. The fix modifies the matching logic to compare device URLs by their base part (before the # subsystem suffix), ensuring that executions are correctly associated with devices regardless of subsystem ID presence.

Key Changes:

  • Updated execution history filtering to strip subsystem suffix (#<subsystemId>) before comparing device URLs
  • Added test coverage for the subsystem matching scenario

Reviewed changes

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

File Description
homeassistant/components/overkiz/diagnostics.py Modified device diagnostics to compare base device URLs without subsystem suffixes when filtering execution history
tests/components/overkiz/test_diagnostics.py Added test case to verify execution history matching correctly ignores subsystem suffixes

Comment on lines +100 to +103
execution_history = [
_FakeExecution("matching", ["rts://****-****-6867/16756006#2"]),
_FakeExecution("other", ["rts://****-****-6867/other_device"]),
]
Copy link

Copilot AI Jan 3, 2026

Choose a reason for hiding this comment

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

The test only covers the case where the device URL has no subsystem suffix but the command URL does. Consider adding test cases for:

  1. Device URL with subsystem matching command URL without subsystem
  2. Device URL with subsystem matching command URL with a different subsystem
  3. Multiple commands with different subsystem suffixes for the same base device

These additional test cases would ensure the bidirectional matching works correctly and cover edge cases where both URLs have subsystems.

Copilot uses AI. Check for mistakes.
@zweckj zweckj merged commit 6cae182 into home-assistant:dev Jan 4, 2026
41 of 42 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 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.

2 participants