-
Notifications
You must be signed in to change notification settings - Fork 0
/
yeelight.html
41 lines (39 loc) · 1.29 KB
/
yeelight.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<script type="text/javascript">
RED.nodes.registerType('yeelight',{
category: 'function',
color: '#a6bbcf',
defaults: {
name: {value:""},
lamp_name: {value:""},
lamp_id: {value:""},
method: {value:"toggle"}
},
inputs:1,
outputs:1,
icon: "font-awesome/fa-lightbulb-o",
label: function() {
return this.name||"yeelight";
}
});
</script>
<script type="text/x-red" data-template-name="yeelight">
<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>
<div class="form-row">
<label for="node-input-prefix"><i class="icon-tag"></i> lamp_id</label>
<input type="text" id="node-input-lamp_id">
</div>
<div class="form-row">
<label for="node-input-prefix"><i class="icon-tag"></i> lamp_name</label>
<input type="text" id="node-input-lamp_name">
</div>
<div class="form-row">
<label for="node-input-prefix"><i class="icon-tag"></i> method</label>
<input type="text" id="node-input-method">
</div>
</script>
<script type="text/x-red" data-help-name="yeelight">
<p>Yeelight toogle</p>
</script>