Skip to content

Commit ac9e313

Browse files
silabs-borislrzr
authored andcommitted
UIC-3222: Fix user added twice
1 parent 2cd1a90 commit ac9e313

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

applications/zpc/components/zwave_command_classes/src/zwave_command_class_user_credential.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,13 +1607,9 @@ sl_status_t zwave_command_class_user_credential_user_handle_report(
16071607
// Each report type has a different behavior
16081608
attribute_store::attribute current_user_id_node;
16091609
switch (user_report_type) {
1610-
// Need to create new user node
1610+
// In either case we want to create the user node if it doesn't exists
1611+
// or update the desired value if it does
16111612
case user_report_type_t::USER_ADDED:
1612-
current_user_id_node
1613-
= endpoint_node.emplace_node(ATTRIBUTE(USER_UNIQUE_ID),
1614-
current_user_id);
1615-
// If this is the first user we get it might not exists yet so we create it.
1616-
// Otherwise we just update the reported value
16171613
case user_report_type_t::RESPONSE_TO_GET:
16181614
current_user_id_node
16191615
= create_or_update_desired_value(endpoint_node,

0 commit comments

Comments
 (0)