node-red-contrib-boolean-logic-ultimate
Advanced tools
Comparing version
@@ -9,3 +9,3 @@ module.exports = function (RED) { | ||
node.topic2Value = undefined; | ||
function setNodeStatus({ fill, shape, text }) { | ||
@@ -45,2 +45,12 @@ let dDate = new Date(); | ||
node.on("input", function (msg) { | ||
if (msg.hasOwnProperty("reset")) { | ||
node.topic1Value = undefined; | ||
node.topic2Value = undefined; | ||
setNodeStatus({ | ||
fill: "grey", | ||
shape: "ring", | ||
text: "Reset", | ||
}); | ||
return; | ||
} | ||
if (!msg.hasOwnProperty("topic")) { | ||
@@ -47,0 +57,0 @@ setNodeStatus({ |
@@ -7,2 +7,6 @@ # node-red-contrib-boolean-logic-ultimate | ||
<p> | ||
<b>Version 1.1.3</b> March 2024<br/> | ||
- Comparator node: NEW: you can now reset both input values to *undefined*, by sending **msg.reset = true**.</br> | ||
</p> | ||
<p> | ||
<b>Version 1.1.2</b> January 2024<br/> | ||
@@ -9,0 +13,0 @@ - NEW: added "normal" and "violated" as default accepted inputs, for compatibility with Home Assistant.</br> |
{ | ||
"name": "node-red-contrib-boolean-logic-ultimate", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"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,0 +5,0 @@ "author": "Supergiovane (https://github.com/Supergiovane)", |
@@ -24,21 +24,6 @@ # node-red-contrib-boolean-logic-ultimate | ||
### COMPATIBLES INPUT VALUES | ||
Other than true/false, all nodes accepts these strings and convert it to true/false. All nodes are compatible with Homeassistant output strings. | ||
|Input|Translated into| | ||
|--|--| | ||
| "on" | true | | ||
| "off" | false | | ||
| "active" | true | | ||
| "inactive" | false | | ||
| "open" | true | | ||
| "closed" or "close" | false | | ||
| "true" | true | | ||
| "false" | false | | ||
| "1" | true | | ||
| "0" | false | | ||
| "home" | true | | ||
| "not_home" | false | | ||
### HOME ASSISTANT COMPATIBLES INPUT VALUES | ||
Other than true/false, all nodes accepts [Homeassistant](https://www.home-assistant.io) output strings. | ||
You can **even add your own input translation word list**, thanks to the translator-config node. | ||
You can add your own translation command, thanks to the translator-config node. | ||
<br/> | ||
@@ -45,0 +30,0 @@ <br/> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1263033
0.03%1436
0.7%475
-3.06%