Skip to content

Add default enum value to supportedAlarmvalues #2259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HunsupJung
Copy link
Collaborator

@HunsupJung HunsupJung commented Jul 15, 2025

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

DoorLockAlarm event is manadatory event in Matter spec and LockJammed is mandatory enum value.
So this patch add unableToLockTheDoor value that is mapped to LockJammed of Matter spec to supportedAlarmValues.

supportedAlarmValues is used in Routine. If supportedAlarmValues is nil, user can select all of lockAlarm Enum value. Even if device does not support some enum values, user can select those values. So we decide to add default value(unableToLockTheDoor) to supportedAlarmVlaues.

Summary of Completed Tests

Copy link

Copy link

github-actions bot commented Jul 15, 2025

Test Results

   68 files  ± 0    445 suites   - 3   0s ⏱️ ±0s
2 324 tests  - 18  2 324 ✅  - 18  0 💤 ±0  0 ❌ ±0 
3 915 runs   - 60  3 915 ✅  - 60  0 💤 ±0  0 ❌ ±0 

Results for commit 44055e6. ± Comparison against base commit d69565d.

This pull request removes 18 tests.
Handle preference: autoRootDeviceReport (parameter 32) in infoChanged
Handle preference: exWPctThresholdPhaseA (parameter 17) in infoChanged
Handle preference: exWPctThresholdPhaseB (parameter 18) in infoChanged
Handle preference: exWPctThresholdTotal (parameter 16) in infoChanged
Handle preference: exWThresholdPhaseA (parameter 9) in infoChanged
Handle preference: exWThresholdPhaseB (parameter 10) in infoChanged
Handle preference: exWThresholdPhaseC (parameter 11) in infoChanged
Handle preference: exWThresholdTotal (parameter 8) in infoChanged
Handle preference: imWPctThresholdPhaseA (parameter 13) in infoChanged
Handle preference: imWPctThresholdPhaseB (parameter 14) in infoChanged
…

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 15, 2025

File Coverage
All files 84%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/new-matter-lock/init.lua 81%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/lock_utils.lua 98%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 44055e6

@@ -204,6 +204,8 @@ local function info_changed(driver, device, event, args)
end
end
device:subscribe()
device:emit_event(capabilities.lockAlarm.alarm.clear({state_change = true}))
device:emit_event(capabilities.lockAlarm.supportedAlarmValues({"unableToLockTheDoor"})) -- lockJammed is madatory
Copy link
Contributor

Choose a reason for hiding this comment

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

How about to add {visibility = {displayed = false}} here?

Copy link
Collaborator Author

@HunsupJung HunsupJung Jul 16, 2025

Choose a reason for hiding this comment

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

Oh yes, I missed that option. I will add it.

Signed-off-by: Hunsup Jung <[email protected]>
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.

3 participants