node-red-contrib-hubitat
Version:
Node Red module for Hubitat API
50 lines (45 loc) • 1.52 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('hubitat request', {
category: 'hubitat',
color: '#ACE043',
defaults: {
name: { value: '' },
server: { type: 'hubitat config', required: true },
path: { value: '' },
},
inputs: 1,
outputs: 1,
align: 'right',
icon: 'request.svg',
label() { return this.name || 'request'; },
paletteLabel: 'request',
});
</script>
<script type="text/html" data-template-name="hubitat request">
<div class="form-row">
<label for="node-input-server"><i class="fa fa-globe"></i> Server</label>
<input type="text" id="node-input-server">
</div>
<div class="form-row">
<label for="node-input-path"><i class="fa fa-lightbulb-o"></i> Device</label>
<input type="text" id="node-input-path" placeholder="/devices/all" list="paths">
<datalist id="paths">
<option>/devices</option>
<option>/devices/all</option>
</datalist>
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/html" data-help-name="hubitat request">
<p>A generic node that send any request to Hubitat.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">msg.path <span class="property-type">string</span></dt>
<dd>Allow to overwrite the path.</dd>
</dl>
<h3>Output</h3>
The same message as the input.
</script>