Skip to content

Conversation

Cornelius117
Copy link
Contributor

@Cornelius117 Cornelius117 commented Oct 13, 2025

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

The modification originated from this PR (#2422). Considering that there was a big code refactoring, we closed the previous submission and proposed this new PR.
In the past, the button devices with motion sensor did not support their complete functions. Now add relevant processing logic, so that this kind of devices can display the sensor normally in the plugin.

Summary of Completed Tests

The unit test file is contained in the commit, and all tests can pass. In addition, we have tested it on device and the function was normal.

Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

Copy link

Copy link

github-actions bot commented Oct 13, 2025

Test Results

   71 files    456 suites   0s ⏱️
2 354 tests 2 354 ✅ 0 💤 0 ❌
3 997 runs  3 997 ✅ 0 💤 0 ❌

Results for commit 3601470.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Oct 13, 2025

File Coverage
All files 92%
/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/sub_drivers/third_reality_mk1/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/generic_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/generic_handlers/attribute_handlers.lua 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/generic_handlers/capability_handlers.lua 88%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/utils/switch_fields.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/utils/switch_utils.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/utils/embedded_cluster_utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 92%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 3601470

@Cornelius117
Copy link
Contributor Author

@nickolas-deboom @hcarter-775 We closed the previous PR (#2422) and moved here. Please check the modification, thank you!

end
local motion_eps = device:get_endpoints(clusters.OccupancySensing.ID)
if #motion_eps > 0 then
profile_name = profile_name .. "-motion"
Copy link
Contributor

@hcarter-775 hcarter-775 Oct 17, 2025

Choose a reason for hiding this comment

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

this may misprofile button devices that have this format but are not configured with 3 or 6 buttons. Please add a check here of something like if #motion_eps > 0 and (num_button_eps == 3 or num_button_eps == 6) then

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.

5 participants