-
Notifications
You must be signed in to change notification settings - Fork 438
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
base: main
Are you sure you want to change the base?
Conversation
Invitation URL: |
Test Results 59 files 375 suites 0s ⏱️ For more details on these errors, see this check. Results for commit 9400cee. ♻️ This comment has been updated with latest results. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against 9400cee |
7b7e89d
to
bef1dce
Compare
…arm-nobattery Signed-off-by: Hunsup Jung <hunsup.jung@samsung.com>
bef1dce
to
9400cee
Compare
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"}) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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.