smart-nodes 0.4.17 → 0.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -153,3 +153,7 @@
153
153
 
154
154
  - Fixed mixing valve position calculation.
155
155
  - Fixed up_down message for central node.
156
+
157
+ ## Version 0.4.18:
158
+
159
+ - Fixed up_down message for central node.
@@ -107,10 +107,19 @@ module.exports = function (RED)
107
107
  }
108
108
  else if (real_topic == "up_down")
109
109
  {
110
- if (new_msg.payload)
110
+ if (new_msg.payload === false)
111
+ {
111
112
  new_msg.topic = "down";
112
- else
113
+ }
114
+ else if (new_msg.payload === true)
115
+ {
113
116
  new_msg.topic = "up";
117
+ }
118
+ else
119
+ {
120
+ helper.warn("Invalid payload for central, topic=up_down. Only boolean is allowed and required");
121
+ return;
122
+ }
114
123
  }
115
124
  break;
116
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-nodes",
3
- "version": "0.4.17",
3
+ "version": "0.4.18",
4
4
  "description": "Smart Nodes",
5
5
  "keywords": [
6
6
  "node-red",