From 648da4380f114e2946ad33b243d9de7bafa134a0 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Wed, 19 Feb 2020 09:24:45 +0100 Subject: [PATCH] feat: Add status string to node status and lastUpdate value on zwave valueId object #260 --- lib/Gateway.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Gateway.js b/lib/Gateway.js index 2eeea271c99..9caa5ec8ab0 100755 --- a/lib/Gateway.js +++ b/lib/Gateway.js @@ -159,6 +159,8 @@ function onNodeSceneEvent (event, node, code) { function onValueChanged (valueId, node, changed) { var data, topic, valueConf + valueId.lastUpdate = Date.now() + // emit event to socket if (this.zwave) this.zwave.emitEvent('VALUE_UPDATED', valueId) @@ -278,7 +280,7 @@ function onNodeStatus (node) { if (this.config.payloadType === 2) { data = node.ready } else { - data = { time: Date.now(), value: node.ready } + data = { time: Date.now(), value: node.ready, status: node.status } } this.mqtt.publish(topic, data)