-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcontactsensor.html
75 lines (65 loc) · 2.41 KB
/
contactsensor.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('mattercontactsensor',{
category: 'Matter',
color: '#669999',
icon: "font-awesome/fa-check-square-o",
inputs:1,
outputs:0,
defaults: {
name: {value:""},
bridge: { value: "", type: "matterbridge", required: true },
initial: {value: true},
bat: {value : false}
},
label: function() {
return this.name||"Contact Sensor";
},
paletteLabel: "Contact Sensor"
});
</script>
<script type="text/x-red" data-template-name="mattercontactsensor">
<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-initial">Initial State</label>
<select type="text" id="node-input-initial" style="width:50%;" >
<option value=true>True</option>
<option value=false>False</option>
</select>
</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="mattercontactsensor">
<p>A Bridged Contact Sensor</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>
payload
<span class="property-type">
bool
</span>
</dt>
<dd>
The state of the sensor
<code>True</code> would be treated as the sensor being "Open"
<code>False</code> would be treated as the sensor being "Closed"
</dd>
</dl>
</dl>
<h3>Details</h3>
Initial state is how the Matter controller will see the sensor on startup.
As this is a sensor it cannot be updated by the Matter controller and as such has no output only input.
</script>