-
Notifications
You must be signed in to change notification settings - Fork 0
/
homekit-unpair.html
44 lines (41 loc) · 1.35 KB
/
homekit-unpair.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
<script type="text/javascript">
RED.nodes.registerType('homekit-unpair', {
category: 'HomeKit',
color: '#a6bbcf',
defaults: {
name: { value: "" },
selectionCriteria: { value: `{ "mac-address": "", "id": "", "serial": "","name": "" }` },
pairingData: { value: "", type: "homekit-pairing-data" },
},
inputs: 1,
outputs: 2,
outputLabels: ["Output", "Error"],
label: function () {
return this.name || "Home Kit Unpair";
},
paletteLabel: "Unpair",
oneditprepare: () => {
$("#node-input-selectionCriteria").typedInput({
type: "json",
types: ["json"]
});
}
});
</script>
<script type="text/html" data-template-name="homekit-unpair">
<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>
<div class="form-row">
<label for="node-input-pairingData"><i class="fa fa-tag"></i> Pairing Data DB</label>
<input id="node-input-pairingData">
</div>
<div class="form-row">
<label for="node-input-selectionCriteria"><i class="fa fa-tag"></i> Selection Criteria</label>
<input type="text" id="node-input-selectionCriteria">
</div>
</script>
<script type="text/html" data-help-name="homekit-unpair">
<p>A node to remove pairing data from device.</p>
</script>