node-red-contrib-boolean-logic-ultimate
Advanced tools
Comparing version 1.0.54 to 1.0.55
@@ -18,4 +18,8 @@ module.exports = function (RED) { | ||
// 11/11/2021 Clone input message and replace only relevant topics | ||
const utils = require("./utils.js"); | ||
let sPayload = utils.fetchFromObject(msg, config.payloadPropName || "payload"); | ||
// 15/11/2021 inform user about undefined topic or payload | ||
if (!msg.hasOwnProperty("payload") || msg.payload === undefined || msg.payload === null) { | ||
if (sPayload === undefined ) { | ||
setNodeStatus({ fill: "red", shape: "dot", text: "Received invalid payload from " + msg.topic || "" }); | ||
@@ -25,12 +29,9 @@ return; | ||
// 11/11/2021 Clone input message and replace only relevant topics | ||
const utils = require("./utils.js"); | ||
var bRes = null; | ||
try { | ||
bRes = utils.ToBoolean(msg.payload); | ||
bRes = utils.ToBoolean(sPayload); | ||
} catch (error) { | ||
} | ||
if (bRes === undefined || bRes === null) { | ||
setNodeStatus({ fill: "red", shape: "dot", text: "Received non convertible boolean value " + msg.payload + " from " + msg.topic }); | ||
setNodeStatus({ fill: "red", shape: "dot", text: "Received non convertible boolean value " + sPayload + " from " + msg.topic }); | ||
return; | ||
@@ -37,0 +38,0 @@ } |
@@ -7,3 +7,3 @@ # node-red-contrib-boolean-logic-ultimate | ||
<p> | ||
<b>Version 1.0.54</b> July 2022<br/> | ||
<b>Version 1.0.55</b> July 2022<br/> | ||
- NEW: you can now specify the input property name from witch the node picks up the payload.</br> | ||
@@ -10,0 +10,0 @@ - NEW: added more Homeassistant string compatibility values.</br> |
{ | ||
"name": "node-red-contrib-boolean-logic-ultimate", | ||
"version": "1.0.54", | ||
"version": "1.0.55", | ||
"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)", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1232045
938