smart-nodes 0.3.5 → 0.3.6

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.5",
3
+ "version": "0.3.6",
4
4
  "description": "Smart Nodes",
5
5
  "keywords": [
6
6
  "node-red",
@@ -113,6 +113,7 @@ module.exports = function (RED)
113
113
  break;
114
114
 
115
115
  case "prozent":
116
+ case "%":
116
117
  case "percent":
117
118
  case "percentage":
118
119
  // node.log("Set action to position");
@@ -159,6 +160,12 @@ module.exports = function (RED)
159
160
  {
160
161
  number = parseInt(word, 10);
161
162
  }
163
+ else if (word[word.length - 1] == "%" && Number.isInteger(word.substr(0, word.length - 1)))
164
+ {
165
+ number = parseInt(word.substr(0, word.length - 1), 10);
166
+ mode = "shutter";
167
+ action = "position";
168
+ }
162
169
  else
163
170
  {
164
171
  // node.log("Ignore word " + word);