node-red-contrib-switchbot-devices
Version:
Simple node to get list of Switchbot devices and their status with Node-RED
29 lines (28 loc) • 845 B
HTML
<script type="text/javascript">
RED.nodes.registerType('switchbot-token', {
category: 'config',
defaults: {
name: { value: "" }
},
credentials: {
token: {type: 'password'}
},
label: function () {
return this.name || 'Switchbot User'
},
exportable: false
});
</script>
<script type="text/html" data-template-name="switchbot-token">
<div class="form-row">
<label><i class="fa fa-wrench"></i> Config</label>
</div>
<div class="form-row">
<label for="node-config-input-token"><i class="fa fa-key"></i> Token</label>
<input type="text" id="node-config-input-token">
</div>
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name">
</div>
</script>