Resend cached states on MQTT reconnect. #105

This commit is contained in:
Koenkk
2018-06-11 20:31:05 +02:00
parent cd13286ca7
commit 3c062a330d
+7
View File
@@ -85,6 +85,13 @@ class Controller {
}
});
}
// Resend all cached states.
this.zigbee.getAllClients().forEach((device) => {
if (this.stateCache.hasOwnProperty(device.ieeeAddr)) {
this.mqttPublishDeviceState(device.ieeeAddr, this.stateCache[device.ieeeAddr], false);
}
});
}
softResetTimeout(start) {