A few fixes for previous commits
This commit is contained in:
1 parent
4b4bcb4516
commit
c2d55f08d4
1 file changed
+8
-5
+8
-5
@@ -989,9 +989,11 @@ function rpcRequest(sessionContext, _declarations, callback) {
|
||||
for (const c of toClear) {
|
||||
if (c[1] > sessionContext.timestamp) c[1] = sessionContext.timestamp;
|
||||
|
||||
for (const [k, v] of Object.entries(c[2])) {
|
||||
if (v > sessionContext.timestamp)
|
||||
c[2][k] = sessionContext.timestamp;
|
||||
if (c[2]) {
|
||||
for (const [k, v] of Object.entries(c[2])) {
|
||||
if (v > sessionContext.timestamp)
|
||||
c[2][k] = sessionContext.timestamp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1696,7 +1698,7 @@ function generateSetRpcRequest(sessionContext) {
|
||||
}
|
||||
|
||||
// Factory reset
|
||||
if (syncState.reboot) {
|
||||
if (syncState.factoryReset) {
|
||||
const p = sessionContext.deviceData.paths.get(["FactoryReset"]);
|
||||
const attrs = p ? sessionContext.deviceData.attributes.get(p) : null;
|
||||
if (
|
||||
@@ -1873,7 +1875,8 @@ function processDeclarations(
|
||||
}
|
||||
}
|
||||
|
||||
allDeclareAttributeValues.get(path) || declareAttributeValues;
|
||||
declareAttributeValues =
|
||||
allDeclareAttributeValues.get(path) || declareAttributeValues;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user