feat(gateway): add a node to access a gateway
This commit is contained in:
@@ -1,3 +1,48 @@
|
||||
<!-- The Input Node -->
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('xiaomi-gateway', {
|
||||
category: 'xiaomi',
|
||||
color: '#3FADB5',
|
||||
defaults: {
|
||||
gateway: {value:"", type:"xiaomi-configurator"},
|
||||
name: {value: ""}
|
||||
},
|
||||
inputs: 1,
|
||||
outputs: 1,
|
||||
outputLabels: ["Gateway"],
|
||||
paletteLabel: "gateway",
|
||||
icon: "gateway-icon.png",
|
||||
label: function () {
|
||||
return this.name || "xiaomi-gateway";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-template-name="xiaomi-gateway">
|
||||
<div class="form-row">
|
||||
<label for="node-input-gateway"><i class="icon-tag"></i> Gateway</label>
|
||||
<input type="text" id="node-input-gateway" placeholder="xiaomi gateway">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="xiaomi-gateway">
|
||||
<p>The gateway itself.</p>
|
||||
|
||||
<h3>Outputs</h3>
|
||||
<ol class="node-ports">
|
||||
<li>Devices output
|
||||
<dl class="message-properties">
|
||||
<dt>gateway <span class="property-type">xiaomi-configurator</span></dt>
|
||||
<dd>The gateway.</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ol>
|
||||
</script>
|
||||
|
||||
<!-- The Input Node -->
|
||||
<script type="text/x-red" data-template-name="xiaomi-gateway in">
|
||||
<div class="form-row">
|
||||
@@ -22,7 +67,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('xiaomi-gateway in',{
|
||||
category: 'xiaomi in-out',
|
||||
category: 'xiaomi in out',
|
||||
color: '#087F8A',
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
@@ -83,7 +128,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('xiaomi-gateway out',{
|
||||
category: 'xiaomi in-out',
|
||||
category: 'xiaomi in out',
|
||||
color: '#087F8A',
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
|
||||
Reference in New Issue
Block a user