Skip to content

Add support for additional Closure device types#2751

Open
nickolas-deboom wants to merge 4 commits intomigrate-window-covering-driver-to-matter-switchfrom
support-additional-closure-types
Open

Add support for additional Closure device types#2751
nickolas-deboom wants to merge 4 commits intomigrate-window-covering-driver-to-matter-switchfrom
support-additional-closure-types

Conversation

@nickolas-deboom
Copy link
Contributor

@nickolas-deboom nickolas-deboom commented Feb 3, 2026

This adds support for the Covering, Gate, Door, and GarageDoor closure subtypes.

Note that this PR depends on #2714

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Duplicate profile check: Warning - duplicate profiles detected.
door.yml == gate.yml

- id: refresh
version: 1
categories:
- name: Door
Copy link
Contributor Author

@nickolas-deboom nickolas-deboom Feb 3, 2026

Choose a reason for hiding this comment

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

A request for a new Gate category has been opened, and once that's published we can update the category here to reflect that

@nickolas-deboom nickolas-deboom force-pushed the support-additional-closure-types branch from ce17223 to 4803fa1 Compare February 3, 2026 21:43
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

File Coverage
All files 89%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/embedded_cluster_utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/types/CurrentPositionEnum.lua 68%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/types/Feature.lua 50%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/types/MainStateEnum.lua 71%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/types/TargetPositionEnum.lua 69%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/types/OverallTargetStateStruct.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/types/OverallCurrentStateStruct.lua 51%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/closures/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/server/attributes/OverallTargetState.lua 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/server/attributes/OverallCurrentState.lua 62%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/server/attributes/MainState.lua 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/init.lua 71%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/closures/closure_handlers/capability_handlers.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/closures/closure_handlers/attribute_handlers.lua 79%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 89%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 86%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded_clusters/ClosureControl/server/commands/init.lua 58%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 96%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 6128583

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Test Results

   71 files  ±0    485 suites  +1   0s ⏱️ ±0s
2 498 tests ±0  2 498 ✅ ±0  0 💤 ±0  0 ❌ ±0 
4 317 runs  +1  4 317 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit 6128583. ± Comparison against base commit ca9c2e7.

♻️ This comment has been updated with latest results.

This adds support for Coverings, Gate, Doors, and GarageDoors closure subtypes.
@nickolas-deboom nickolas-deboom force-pushed the support-additional-closure-types branch from 4803fa1 to b0c7eb5 Compare February 4, 2026 16:02
device:emit_event_for_endpoint(ib.endpoint_id, capabilities.windowShadeLevel.shadeLevel(level))
end

function ClosureAttributeHandlers.main_state_attr_handler(driver, device, ib, response)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking over this logic again, some changes are definitely needed. There is no guaranteed ordering of when these attributes will be processed and so saving the data in fields in these handlers doesn't mean that the fields would contain the latest report if a given attribute is received after another one. I'm going to try a few different ways to restructure this logic and will add some unit tests to verify

@nickolas-deboom nickolas-deboom force-pushed the support-additional-closure-types branch from 16b02c7 to 2b519fa Compare February 4, 2026 22:15
@nickolas-deboom nickolas-deboom force-pushed the support-additional-closure-types branch from 2b519fa to 97b819c Compare February 4, 2026 22:16
@nickolas-deboom nickolas-deboom force-pushed the support-additional-closure-types branch from 1fa859f to 0b53893 Compare February 5, 2026 17:55
@nickolas-deboom nickolas-deboom force-pushed the support-additional-closure-types branch from 0b53893 to 6128583 Compare February 5, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant