Skip to content

Matter Switch: Version gate the extra init event on added#2938

Merged
hcarter-775 merged 3 commits intomainfrom
version-gate-added-subscription
May 7, 2026
Merged

Matter Switch: Version gate the extra init event on added#2938
hcarter-775 merged 3 commits intomainfrom
version-gate-added-subscription

Conversation

@hcarter-775
Copy link
Copy Markdown
Contributor

@hcarter-775 hcarter-775 commented Apr 30, 2026

Description of Change

As of Hub FW 58, the caching issues have been solved and so this extra event is not required any longer.

Summary of Completed Tests

This changeset is large primarily because I took this opportunity to restructure several test files that were checking the entire added -> init -> doConfigure cycle for every test, or that were testing pieces of code that were already tested elsewhere verbatim. I also just removed the added check in several places for simplicity, rather than re-versioning ~100 tests.

In particular, I really took the hammer to test_matter_switch.lua‎ and test_light_illuminance_motion.lua‎, since there was significant overlap between these 2 and they were the first ones I looked at. I think a similar treatment is likely due for many of our Generic Switch tests, but I selectively reworked pieces as time permitted.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Channel deleted.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 89%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 92%
/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 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 82%
/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/switch_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua 93%
/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/camera/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 96%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 6748a2b

@hcarter-775 hcarter-775 force-pushed the version-gate-added-subscription branch from ca47e49 to f554da0 Compare April 30, 2026 21:45
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Test Results

   72 files    508 suites   0s ⏱️
2 822 tests 2 822 ✅ 0 💤 0 ❌
4 689 runs  4 689 ✅ 0 💤 0 ❌

Results for commit 6748a2b.

♻️ This comment has been updated with latest results.

Comment thread drivers/SmartThings/matter-switch/src/test/test_matter_button.lua
@cjswedes
Copy link
Copy Markdown
Contributor

cjswedes commented May 7, 2026

Looks like there are several failing tests.

@hcarter-775
Copy link
Copy Markdown
Contributor Author

@cjswedes yeah I'm looking into that, we just merged the Irrigation System PR and I need to update those tests

@hcarter-775 hcarter-775 force-pushed the version-gate-added-subscription branch from ddee6cc to 6748a2b Compare May 7, 2026 19:16
@hcarter-775
Copy link
Copy Markdown
Contributor Author

New unit tests updated in a similar way.

@hcarter-775 hcarter-775 merged commit ba2b1e3 into main May 7, 2026
13 checks passed
@hcarter-775 hcarter-775 deleted the version-gate-added-subscription branch May 7, 2026 19:51
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.

2 participants