Skip to content
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

Map doorlock that doesn't support Power source cluster to lock-lockalarm-nobattery #1446

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HunsupJung
Copy link
Collaborator

SecuYou releases their Matter supported door lock. securYou Smart Lock. (Link)
This door lock doesn't support Power source cluster and we need to map door lock that doesn't support Power source cluster to lock-lockalarm-nobattery.

Copy link

Copy link

github-actions bot commented Jun 15, 2024

Test Results

   59 files    375 suites   0s ⏱️
1 807 tests 1 795 ✅ 0 💤 0 ❌ 12 🔥
3 129 runs  3 117 ✅ 0 💤 0 ❌ 12 🔥

For more details on these errors, see this check.

Results for commit 9400cee.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 15, 2024

File Coverage
All files 73%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/lock_utils.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-lock/src/init.lua 71%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 9400cee

…arm-nobattery

Signed-off-by: Hunsup Jung <hunsup.jung@samsung.com>
local battery_eps = device:get_endpoints(clusters.PowerSource.ID, {feature_bitmap = clusters.PowerSource.types.PowerSourceFeature.BATTERY})
if #battery_eps == 0 then
device.log.debug("Device does not support battery. Switching profile.")
device:try_update_metadata({profile = "lock-lockalarm-nobattery"})
Copy link
Contributor

Choose a reason for hiding this comment

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

The profile will get changed again if #pins_eps == 0 due to the code just below

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that is correct. In fact, because of the PR I pushed, there is no possibility of executing the code below at this time. so.. I think below code can be removed from the device_added function.

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.

None yet

2 participants