smart-nodes 0.3.7 → 0.3.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-nodes",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "Smart Nodes",
5
5
  "keywords": [
6
6
  "node-red",
@@ -79,6 +79,12 @@ module.exports = function (RED)
79
79
  // node.log("Set action to on");
80
80
  mode = "light";
81
81
  action = "on";
82
+ if (performAction(mode, action, number, affectedNodes))
83
+ {
84
+ action = null;
85
+ affectedNodes = [];
86
+ number = null;
87
+ }
82
88
  break;
83
89
 
84
90
  case "aus":
@@ -87,6 +93,12 @@ module.exports = function (RED)
87
93
  // node.log("Set action to off");
88
94
  mode = "light";
89
95
  action = "off";
96
+ if (performAction(mode, action, number, affectedNodes))
97
+ {
98
+ action = null;
99
+ affectedNodes = [];
100
+ number = null;
101
+ }
90
102
  break;
91
103
 
92
104
  case "hoch":
@@ -258,6 +270,12 @@ module.exports = function (RED)
258
270
  {
259
271
  for (const node of affectedNodes)
260
272
  {
273
+ if (mode == "light" && !["smart_light-control", "smart_scene-control"].includes(node.type))
274
+ continue;
275
+
276
+ if (mode == "shutter" && !["smart_shutter-control", "smart_shutter-complex-control"].includes(node.type))
277
+ continue;
278
+
261
279
  // node.log("Notify node " + node.id);
262
280
  if (action == "position")
263
281
  {