diff --git a/package.json b/package.json index 7c0eab0..2caa883 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vvzvlad/node-red-contrib-rn-combined-nodes", - "version": "0.2.4", + "version": "0.2.5", "description": "", "main": "index.js", "keywords": [ diff --git a/thermostat-analyzer.js b/thermostat-analyzer.js index bf26ead..bad60a8 100644 --- a/thermostat-analyzer.js +++ b/thermostat-analyzer.js @@ -129,8 +129,8 @@ module.exports = function(RED) { if (msg.payload.current_temp === null && typeof msg.payload.current_temp === "undefined") msg_current_temp = null else msg_current_temp = { payload: get_current_temp(msg) } - let key = "fake" - let msg_mqtt_debug = { payload: analyzer(msg), topic: `debug/${msg.topic}/th/${key}`} + let stats = analyzer(msg) + let msg_mqtt_debug = { payload: JSON.stringify(stats), topic: `debug/${msg.topic}/th`} node.send([msg_mqtt_debug, msg_state_text, msg_current_temp]); });