Update lockState attribute when lock/unlock action occurs (#21747)
* Update lockState attribute when lock/unlock action occurs
* Restyled by whitespace
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/examples/lock-app/efr32/src/LockManager.cpp b/examples/lock-app/efr32/src/LockManager.cpp
index dba7126..7e52e95 100644
--- a/examples/lock-app/efr32/src/LockManager.cpp
+++ b/examples/lock-app/efr32/src/LockManager.cpp
@@ -650,6 +650,9 @@
{
ChipLogDetail(Zcl, "Door Lock App: setting door lock state to \"%s\" [endpointId=%d]", lockStateToString(lockState),
endpointId);
+
+ DoorLockServer::Instance().SetLockState(endpointId, lockState);
+
return true;
}
@@ -671,6 +674,8 @@
"Lock App: specified PIN code was found in the database, setting lock state to \"%s\" [endpointId=%d]",
lockStateToString(lockState), mEndpointId);
+ DoorLockServer::Instance().SetLockState(endpointId, lockState);
+
return true;
}
}