Repository navigation
zigbee window treatment: remove duplicate shade level handlers and refactor out duplicate logic - #3394
Open
hcarter-775 wants to merge 4 commits into
Conversation
hcarter-775
requested review from
NoahCornell,
aleclorimer,
cbaumler,
cjswedes and
ctowns
December 4, 2026 18:32
hcarter-775
force-pushed
the
zigbee-window-treatment/refactor/remove-duplicate-shade-level-handlers
branch
from
December 4, 2026 18:33
dcd0d92 to
106f4d3
Compare
|
Invitation URL: |
|
zigbee-window-treatment_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against efbb962 |
Test Results 73 files 584 suites 0s ⏱️ Results for commit efbb962. ♻️ This comment has been updated with latest results. |
- Move the optimistic set-level handling and resting-state mapping shared by the AXIS Gear and AXIS Gear with version drivers into `axis_utils` - Each driver now only supplies how it sends the level to the device - No behaviour change Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Root `presetPosition` handler now injects `setShadeLevel` with the resolved preset level, like `stepShadeLevel` already does - Remove per-driver preset handlers in axis, axis_version, feibit, invert-lift-percentage, somfy, vimar and hanssem; presets pick up each driver's own `setShadeLevel` handling - Reuse `get_preset_level` instead of repeating the lookup inline - yoolax keeps its preset handler for now Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Register `setShadeLevel` under `windowShadeLevel` so it runs instead of falling through to the non-inverting default - Read the level from `command.args.shadeLevel`, not `command.value` - Call `device.thread:cancel_timer` with a colon - Drop the preset handler; the root preset now routes through the inverted `setShadeLevel` - Add tests for inverted `setShadeLevel` and non-default presets Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Description of Change
Remove duplicate code (either duplicated in the subdriver itself or against the Zigbee defaults) from the Zigbee Window Treatment driver.
This includes duplicate logic in the aqara and axis subdrivers that have been consolidated for clarity, and a general refactor as it affects preset handling in subdrivers.
Summary of Completed Tests
Unit tests are unchanged.