node-red-contrib-boolean-logic-ultimate 1.0.57 → 1.0.58
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
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
# CHANGELOG
|
|
5
5
|
|
|
6
|
+
<p>
|
|
7
|
+
<b>Version 1.0.58</b> December 2022<br/>
|
|
8
|
+
- NEW: added string conversion from "home", "not_home" to boolean.</br>
|
|
9
|
+
- Updated the README</br>
|
|
10
|
+
</p>
|
|
6
11
|
<p>
|
|
7
12
|
<b>Version 1.0.57</b> September 2022<br/>
|
|
8
13
|
- Added node help in the node-red help tab.</br>
|
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@ Other than true/false, all nodes accepts these strings and convert it to true/fa
|
|
|
35
35
|
| "false" | false |
|
|
36
36
|
| "1" | true |
|
|
37
37
|
| "0" | false |
|
|
38
|
+
| "home" | true |
|
|
39
|
+
| "not_home" | false |
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
<br/>
|
|
@@ -200,8 +202,8 @@ The input message is preserved and passed to the output, changing only the topic
|
|
|
200
202
|
# FILTER ULTIMATE
|
|
201
203
|
|
|
202
204
|
This node has 2 outputs.<br />
|
|
203
|
-
If the input payload is true, the node will send <code>true</code> on output 1 and nothing on
|
|
204
|
-
If the input payload is false, the node will send nothing on output 1 and <code>false</code> on
|
|
205
|
+
If the input payload is true, the node will send <code>true</code> on output 1 and nothing on output 2<br />
|
|
206
|
+
If the input payload is false, the node will send nothing on output 1 and <code>false</code> on output 2<br />
|
|
205
207
|
The input message is preserved and passed to the output, changing only the topic and the payload. If the input message has it's own topic, it'll be preserved as well.<br/>
|
|
206
208
|
|
|
207
209
|
### NODE CONFIGURATION
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
[Find it useful?](https://www.paypal.me/techtoday)
|
|
62
62
|
|
|
63
63
|
This node has 2 outputs.<br />
|
|
64
|
-
If the input payload is true, the node will send <code>true</code> on output 1 and nothing on
|
|
65
|
-
If the input payload is false, the node will send nothing on output 1 and <code>false</code> on
|
|
64
|
+
If the input payload is true, the node will send <code>true</code> on output 1 and nothing on output 2<br />
|
|
65
|
+
If the input payload is false, the node will send nothing on output 1 and <code>false</code> on output 2<br />
|
|
66
66
|
The input message is preserved and passed to the output, changing only the topic and the payload. If the input message has it's own topic, it'll be preserved as well.<br/>
|
|
67
67
|
|
|
68
68
|
|Property|Description|
|
|
@@ -22,6 +22,9 @@ module.exports.ToBoolean = function ToBoolean(value) {
|
|
|
22
22
|
if (value.toLowerCase() === "true") return true;
|
|
23
23
|
if (value.toLowerCase() === "false") return false;
|
|
24
24
|
|
|
25
|
+
if (value.toLowerCase() === "home") return true;
|
|
26
|
+
if (value.toLowerCase() === "not_home") return false;
|
|
27
|
+
|
|
25
28
|
} else if (typeof value === 'number') {
|
|
26
29
|
// Is it formated as a decimal number?
|
|
27
30
|
if (decimal.test(value)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-boolean-logic-ultimate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58",
|
|
4
4
|
"description": "A set of Node-RED enhanced boolean logic and utility nodes, flow interruption, blinker, invert, filter, toggle etc.., with persistent values after reboot. Compatible also with Homeassistant values.",
|
|
5
5
|
"author": "Supergiovane (https://github.com/Supergiovane)",
|
|
6
6
|
"dependencies": {
|