UNPKG

@aeroniemi/node-red-xled

Version:

Node-Red nodes for controlling the brightness/colour of Twinkly lights

63 lines (59 loc) 1.46 kB
<script type="text/javascript"> RED.nodes.registerType('set-colour-hsv', { category: 'xled', color: '#a6bbcf', defaults: { server: { value: "", type: "xled-server" }, hue: { value: undefined, required: false }, saturation: { value: undefined, required: false }, brightness: { value: undefined, required: false }, override: { value: false, }, }, icon: "font-awesome/fa-lightbulb-o", inputs: 1, outputs: 0, label: "set-colour-hsv" }); $("#node-input-override").typedInput({ type: 'bool', }) </script> <script type="text/html" data-template-name="set-colour-hsv"> <div class="form-row"> <label for="node-input-xled-server">Server</label> <input type="text" id="node-input-server"> </div> <div class="form-row"> <label for="node-input-hue">Hue (0-359)</label> <input type="text" id="node-input-hue"> </div> <div class="form-row"> <label for="node-input-saturation">Saturation (0-1)</label> <input type="text" id="node-input-saturation"> </div> <div class="form-row"> <label for="node-input-brightness">Brightness (0-1)</label> <input type="text" id="node-input-brightness"> </div> <div class="form-row"> <label for="node-input-override">Override</label> <input type="checkbox" id="node-input-override"> </div> </script> <script type="text/html" data-help-name="set-colour-hsv"> <p>Set the colour of a Twinkly light using HSV</p> </script>