-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlightsensor.html
75 lines (66 loc) · 2.49 KB
/
lightsensor.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<script type="text/javascript">
RED.nodes.registerType('matterlightsensor',{
category: 'Matter',
color: '#669999',
icon: "font-awesome/fa-sun-o",
inputs:1,
outputs:0,
defaults: {
name: {value:""},
bridge: { value: "", type: "matterbridge", required: true },
minlevel: {value: 1},
maxlevel: {value: 3576000},
bat: {value : false}
},
label: function() {
return this.name||"Light Sensor";
},
paletteLabel: "Light Sensor"
});
</script>
<script type="text/x-red" data-template-name="matterlightsensor">
<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-config-input-bridge">Bridge</label>
<input type="text" id="node-input-bridge" style="width:70%;">
</div>
<div class="form-row">
<label for="node-input-minlevel">Min Level (Lux)</label>
<input type="text" id="node-input-minlevel" style="width:70%;">
</div>
<div class="form-row">
<label for="node-input-minlevel">Max Level (Lux)</label>
<input type="text" id="node-input-maxlevel" style="width:70%;">
</div>
<div class="form-row">
<label for="node-input-bat">Battery</label>
<select type="text" id="node-input-bat" style="width:50%;" >
<option value=false>None</option>
<option value="recharge">Rechargeable</option>
<option value="replace">Replaceable</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="matterlightsensor">
<p>A Bridged Light Sensor</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>
payload
<span class="property-type">
number
</span>
</dt>
<dd>
The light level in lux between the configured min and max values
</dd>
</dl>
</dl>
<h3>Details</h3>
The sensor node should be configured with min and max values for the sensor, between 0 & 3,576,000 in Lux, if not set these will be used as default values.
Note: 100,000 lux is bright sunlight
As this is a sensor it cannot be updated by the Matter controller and as such has no output only input.
</script>