node-red-contrib-switchbot-devices
Version:
Simple node to get list of Switchbot devices and their status with Node-RED
32 lines (30 loc) • 998 B
HTML
<script type="text/javascript">
RED.nodes.registerType('switchbot-list',{
category: 'Switchbot',
color: '#CE4842',
defaults: {
acc: {value: '', type: 'switchbot-token'},
name: {value:""}
},
inputs:1,
outputs:1,
icon: "switchbot.png",
label: function() {
return this.name||"list";
},
paletteLabel: 'list devices'
});
</script>
<script type="text/html" data-template-name="switchbot-list">
<div class="form-row">
<label for="node-input-acc"><i class="fa fa-vcard"></i> User</label>
<input type="text" id="node-input-acc" placeholder="Switchbot Account">
</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="switchbot-list">
<p>Simple node to get list of switchbot devices and their status with Node-RED</p>
</script>