Luigi Cisana пре 7 година
родитељ
комит
7b36a91fa3
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      package.json
  2. 2 2
      ramp-thermostat/ramp-thermostat.js

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
     "name"         : "node-red-contrib-ramp-thermostat",
-    "version"      : "0.3.3",
+    "version"      : "0.3.4",
     "description"  : "A Node-RED node that emulates a thermostat",
     "dependencies": {
     },

+ 2 - 2
ramp-thermostat/ramp-thermostat.js

@@ -67,8 +67,8 @@ module.exports = function(RED) {
           switch (msg.topic) {
             case "setCurrent":
             case "":
-              if (isNaN(msg.payload)) {
-                this.warn("Non numeric input");              
+              if (typeof msg.payload !== "number") {
+                this.warn("Non numeric input");            
               } else {
                 result = this.getState(msg.payload, this.profile);
                 if (result.state !== null) {