node-red-contrib-openhab2-helper
Version:
Node-RED openhab2 helper nodes
47 lines (42 loc) • 1.48 kB
HTML
<script type="text/x-red" data-template-name="openhab2-helper-color-convert">
<div class="form-row">
<label for="node-input-input"><i class="icon-tag"></i> Input</label>
<select id="node-input-input">
<option value="openhab">Openhab</option>
<option value="homekit">Homekit</option>
</select>
</div>
<div class="form-row">
<label for="node-input-output"><i class="icon-tag"></i> Output</label>
<select id="node-input-output">
<option value="openhab">Openhab</option>
<option value="homekit">Homekit</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="openhab2-helper-color-convert">
<p>This node converts between different color representations</p>
<p>Works with <b>node-red-contrib-openhab-v2</b> <i>IN</i>, <i>OUT</i> or <i>GET</i> nodes.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('openhab2-helper-color-convert',{
category: 'OpenHAB',
defaults: {
input:{ value:'openhab'},
output:{ value: 'homekit'}
},
paletteLabel: 'color convert',
inputs: 1,
outputs: 1,
icon: 'node-red-contrib-openhab2-helper.png',
color: '#FF801A',
label: function(){
if (this.input) {
return this.input + " > " + this.output;
}
return "color";
},
oneditprepare: function() {
}
});
</script>