mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-27 21:20:03 +00:00
Resend cached states on MQTT reconnect. #105
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user