UNPKG

node-red-contrib-boolean-logic-ultimate

Version:

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.

70 lines (62 loc) 2.59 kB
<script type="text/javascript"> RED.nodes.registerType('SumUltimate', { category: 'boolean logic ultimate', color: '#ff8080', defaults: { name: { value: "Math" }, property: { value: "payload" }, math: { value: "sum" } }, inputs: 1, outputs: 1, icon: "font-awesome/fa-plus", label: function () { return this.name || "Math"; }, paletteLabel: function () { return "MathUltimate"; }, oneditprepare: function () { if ($("#node-input-property").val() === "") $("#node-input-property").val("payload"); $("#node-input-property").typedInput({ default: 'msg', types: ['msg'] }); } }); </script> <script type="text/x-red" data-template-name="SumUltimate"> <div class="form-row"> <b>Math Ultimate</b>&nbsp&nbsp&nbsp&nbsp<span style="color:red"><i class="fa fa-question-circle"></i>&nbsp<a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate"><u>Help online</u></a></span> &nbsp&nbsp&nbsp<span style="color:red"><i class="fa fa-youtube-play"></i>&nbsp<a target="_blank" href="https://youtu.be/jLIbQgmRzuc"><u>Youtube Sample</u></a></span> <br/> <br/> </div> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Topic</label> <input type="text" id="node-input-name" placeholder="Topic"> </div> <div class="form-row"> <label for="node-input-property"><i class="icon-tag"></i> Input</label> <input type="text" id="node-input-property" placeholder="payload"> </div> <div class="form-row"> <label for="node-input-math"><i class="icon-tag"></i> Operation</label> <select type="text" id="node-input-math" placeholder=""> <option value="sum">Sum</option> <option value="multiply">Multiply</option> </select> </div> </script> <script type="text/markdown" data-help-name="SumUltimate"> [SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate) [Find it useful?](https://www.paypal.me/techtoday) The pourpose of this node is to do maths on the incoming values. Each incoming message MUST HAVE OWN TOPIC.<br /> |Property|Description| |--|--| | Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* | </script>