forked from guidone/node-red-contrib-netatmo-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetatmo-dashboard.html
63 lines (56 loc) · 1.98 KB
/
netatmo-dashboard.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
<script type="text/javascript">
RED.nodes.registerType('netatmo-dashboard',{
category: 'Netatmo',
color: '#669966',
defaults: {
creds: {value: '',type: 'netatmo-config-node'}
},
inputs:1,
outputs:1,
icon: "feed.png",
label: function() {
return 'NetAtmo Dashboard';
}
});
</script>
<script type="text/x-red" data-template-name="netatmo-dashboard">
<div class="form-row">
<label for="node-input-client_id"><i class="icon-tag"></i> Credentials</label>
<input type="text" id="node-input-creds" placeholder="Add NetAtmo credentials">
</div>
</script>
<script type="text/x-red" data-help-name="netatmo-dashboard">
Get JSON payload for NetAtmo dashboard. See http://netatmo.com, https://dev.netatmo.com/doc
</script>
<script type="text/javascript">
RED.nodes.registerType('netatmo-config-node',{
category: 'config',
defaults: {
name: {value:"",required:true},
client_id: {value:"",required:true},
client_secret: {value:"",required:true},
refresh_token: {value:"",required:true}
},
label: function() {
return 'Netatmo device: ' + this.name;
}
});
</script>
<script type="text/x-red" data-template-name="netatmo-config-node">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> App name</label>
<input type="text" id="node-config-input-name" placeholder="MyApp">
</div>
<div class="form-row">
<label for="node-input-client_id"><i class="icon-tag"></i> Client ID</label>
<input type="text" id="node-config-input-client_id" placeholder="56e984c449c7...">
</div>
<div class="form-row">
<label for="node-input-client_secret"><i class="icon-tag"></i> Client Secret</label>
<input type="text" id="node-config-input-client_secret" placeholder="X4l1Ct9G....">
</div>
<div class="form-row">
<label for="node-input-refresh_token"><i class="icon-tag"></i> Refresh Token</label>
<input type="text" id="node-config-input-refresh_token" placeholder="1234567...">
</div>
</script>