diff --git a/time/timeswitch/package.json b/time/timeswitch/package.json index 81f0b773..11613559 100644 --- a/time/timeswitch/package.json +++ b/time/timeswitch/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-timeswitch", - "version" : "0.0.1", + "version" : "0.0.2", "description" : "A Node-RED node to provide a simple timeswitch to schedule daily on/off events.", "dependencies" : { "suncalc": "1.6.0" diff --git a/time/timeswitch/timeswitch.js b/time/timeswitch/timeswitch.js index 31eaa63b..9f12eee2 100644 --- a/time/timeswitch/timeswitch.js +++ b/time/timeswitch/timeswitch.js @@ -138,7 +138,7 @@ module.exports = function(RED) { var msg = {}; if (node.mytopic) { msg.topic = node.mytopic; } - (proceed >= 2) ? (msg.payload = 1) : (msg.payload = 0); + msg.payload = (process>=2) ? 1 : 0; node.send(msg); });