Conversation
|
Invitation URL: |
Test Results 71 files 485 suites 0s ⏱️ For more details on these failures, see this check. Results for commit 9a784e9. ♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 9a784e9 |
Signed-off-by: Hunsup Jung <hunsup.jung@samsung.com>
ed58efb to
0cf840f
Compare
|
@tpmanley Could you please review this PR? |
Signed-off-by: Hunsup Jung <hunsup.jung@samsung.com>
Signed-off-by: Hunsup Jung <hunsup.jung@samsung.com>
3268f4c to
140482b
Compare
| end | ||
| end | ||
| end | ||
| if device.manufacturer_info.vendor_id == 0x135D then |
There was a problem hiding this comment.
We should try to avoid vendor specific checks like this. Any reason we can't just subscribe to the attribute on all devices?
There was a problem hiding this comment.
I coded it because I thought @ctowns wanted it to be applied only to specific devices. If I misunderstood, I will delete it.
https://samsung.slack.com/archives/C063J01GHR6/p1765382793593279?thread_ts=1732583132.684279&cid=C063J01GHR6
There was a problem hiding this comment.
After further discussion, this attribute would be useful for other locks than just this device, so I think we should subscribe to the attribute for all relevant devices by adding it to the subscribed attributes list like this:
DoorLockFeatureMapAttr = {ID = 0xFFFC, cluster = 0x0101}
local subscribed_attributes = {
[capabilities.lock.ID] = {
DoorLock.attributes.LockState,
DoorLockFeatureMapAttr -- added here
},
[capabilities.remoteControlStatus.ID] = {
DoorLock.attributes.OperatingMode
},
[capabilities.lockUsers.ID] = {
DoorLock.attributes.NumberOfTotalUsersSupported
},
[capabilities.lockCredentials.ID] = {
DoorLock.attributes.NumberOfPINUsersSupported,
DoorLock.attributes.MaxPINCodeLength,
DoorLock.attributes.MinPINCodeLength,
DoorLock.attributes.RequirePINforRemoteOperation
},
[capabilities.lockSchedules.ID] = {
DoorLock.attributes.NumberOfWeekDaySchedulesSupportedPerUser,
DoorLock.attributes.NumberOfYearDaySchedulesSupportedPerUser
},
[capabilities.lockAliro.ID] = {
DoorLock.attributes.AliroReaderVerificationKey,
DoorLock.attributes.AliroReaderGroupIdentifier,
DoorLock.attributes.AliroReaderGroupSubIdentifier,
DoorLock.attributes.AliroExpeditedTransactionSupportedProtocolVersions,
DoorLock.attributes.AliroGroupResolvingKey,
DoorLock.attributes.AliroSupportedBLEUWBProtocolVersions,
DoorLock.attributes.AliroBLEAdvertisingVersion,
DoorLock.attributes.NumberOfAliroCredentialIssuerKeysSupported,
DoorLock.attributes.NumberOfAliroEndpointKeysSupported,
},
[capabilities.battery.ID] = {
PowerSource.attributes.BatPercentRemaining
},
[capabilities.batteryLevel.ID] = {
PowerSource.attributes.BatChargeLevel
}
}
Sorry for suggesting the other way originally! I think you can remove this vendor-specific check and make the change above so that this attribute will be available for add devices now 👍
Signed-off-by: Hunsup Jung <hunsup.jung@samsung.com>
Signed-off-by: Hunsup Jung <hunsup.jung@samsung.com>
|
Thanks for the making the requested changes @HunsupJung . The driver code is looking pretty good to me now. In addition to what @ctowns suggested, can you also take a look at the unit tests failures reported by CI and try to add tests for the new code? |
Type of Change
Checklist
Description of Change
Summary of Completed Tests