forked from pattex007/node-red-contrib-fhem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfhem-cmd.html
50 lines (47 loc) · 1.49 KB
/
fhem-cmd.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
<script type="text/javascript">
RED.nodes.registerType('fhem-cmd', {
category: 'FHEM',
color: '#FFFFE7',
defaults: {
name: { value: "" },
fheminstance: { value: "", type: "fhem-instance", required: true }
},
action: { value: '' },
position: {
value: '',
validate: function (v) {
return this.action !== 'position' || !isNaN(v);
}
},
optime: {
value: '',
validate: function (v) {
return v.length === 0 || !isNaN(v);
}
},
emitStop: { value: false },
inputs: 1,
outputs: 1,
icon: "fhemicon.png",
label: function () {
if (this.name) {
return this.name;
} else {
return "fhem-cmd";
}
}
});
</script>
<script type="text/html" data-template-name="fhem-cmd">
<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-fheminstance"><i class="fa fa-cog"></i> Instance</label>
<input id="node-input-fheminstance">
</div>
</script>
<script type="text/html" data-help-name="fhem-cmd">
<p>A node to send a command to a fhem-instance and gets the response</p>
</script>