redmatic-homekit
Version:
HAP-Nodejs based Node-RED nodes to create HomeKit Accessories
54 lines (48 loc) • 1.66 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('redmatic-homekit-programmableswitch', {
category: 'redmatic homekit',
defaults: {
bridgeConfig: {value: 'CC:22:3D:E3:CE:C7:51826', type: 'redmatic-homekit-bridge', required: true},
name: {value: ''},
count: {value: 4}
},
inputs: 1,
outputs: 0,
icon: 'homekit2.png',
color: '#E2D96E',
paletteLabel: 'event',
align: 'left',
label() {
return this.name || 'event';
},
labelStyle() {
return this.name ? 'node_label_italic' : '';
},
});
</script>
<script type="text/x-red" data-template-name="redmatic-homekit-programmableswitch">
<div class="form-row">
<label for="node-input-bridgeConfig"><i class="icon-globe"></i> Bridge</label>
<input type="text" id="node-input-bridgeConfig">
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-globe"></i> Name</label>
<input type="text" id="node-input-name">
</div>
<div class="form-row">
<label for="node-input-count"><i class="icon-globe"></i> Key Count</label>
<select id=node-input-count>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>6</option>
<option>8</option>
<option>12</option>
<option>19</option>
<option>50</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="redmatic-homekit-programmableswitch">
</script>