-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathNetatmo.widget.json
77 lines (77 loc) · 9.79 KB
/
Netatmo.widget.json
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
76
77
{
"template": "<style>\n\n.netatmo-table {\n width: 100%;\n height: 100%;\n padding: 10px;\n border: 0px;\n}\n.netatmo-table td {\n border: 0px solid white;\n}\n\n.sub-table {\n width: 100%;\n height: 100%;\n padding: 10px;\n border: 0px;\n}\n\n.sub-table td {\n border: 0px solid white;\n}\n\n.label-row {\n height: 10%;\n padding: 0px;\n}\n.content-row {\n height: 90%;\n padding: 0px;\n}\n \n.temperature-row {\n height: 50%;\n padding: 0px;\n}\n \n.humidity-row {\n text-align: center;\n height: 30%;\n padding: 0px;\n}\n \n.carb-row {\n text-align: center;\n height: 20%;\n padding: 0px;\n}\n \n.label-text {\n font-size: 1em;\n text-align: center; \n vertical-align: top;\n}\n \n.main-temperature-text {\n font-size: 1.75em;\n text-align: right;\n vertical-align: top;\n line-height: 1em;\n width: 50%;\n padding-top: 0px;\n}\n \n.main-temperature-sign {\n font-size: 1em;\n text-align: left;\n width: 25%;\n vertical-align: top;\n}\n \n.main-temperature-icon { \n text-align: center;\n width: 25%;\n vertical-align: top;\n padding-top: 0px;\n}\n \n.main-humidity-text {\n font-size: 1.45em;\n text-align: right;\n line-height: 1em;\n vertical-align: top;\n width: 50%;\n}\n \n.main-humidity-sign {\n font-size: 0.75em;\n text-align: left;\n width: 25%;\n vertical-align: top;\n}\n \n.main-humidity-icon { \n text-align: center;\n width: 25%;\n vertical-align: top;\n padding-top: 0px;\n padding-right: 0px;\n}\n\n.main-carb-text {\n font-size: 1.2em;\n text-align: right;\n line-height: 1em;\n vertical-align: top;\n width: 50%;\n padding-top: 2px;\n}\n \n.main-carb-sign {\n font-size: 0.5em;\n text-align: left;\n width: 25%;\n vertical-align: top;\n}\n \n.main-carb-icon { \n text-align: center;\n width: 25%;\n vertical-align: top; \n padding-right: 0px;\n padding-top: 0px;\n} \n \n.main-bat-icon {\n font-size: 0.6em;\n text-align: left;\n width: 5%;\n vertical-align: top;\n}\n.main-bat-text {\n font-size: 0.6em;\n text-align: left;\n width: 10%;\n vertical-align: top;\n padding-top: 2px;\n padding-left: 2px;\n}\n.main-rf-icon {\n font-size: 0.6em;\n text-align: left;\n width: 5%;\n vertical-align: top;\n}\n</style>\n<a href=\"#/view/{{config.dashboard_name}}\">\n <table class=\"netatmo-table\">\n <tr class=\"label-row\">\n <td class=\"label-text\">{{config.label}}</td>\n </tr>\n \n <tr class=\"content-row\">\n <td>\n \n <table class=\"sub-table\">\n <tr class=\"temperature-row\">\n <td class=\"main-temperature-icon\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'temperature'\" size=\"20\"/>\n </td>\n <td class=\"main-temperature-text\"> \n {{'%.1f' | sprintf:itemValue(config.temperature).split(' ')[0]}}\n </td>\n <td class=\"main-temperature-sign\">\n °C\n </td>\n </tr>\n </table> \n\n <div ng-if=\"config.show_humidity == true\">\n <table class=\"sub-table\">\n <tr class=\"humidity-row\">\n <td class=\"main-humidity-icon\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'humidity'\" size=\"18\"/>\n </td>\n <td class=\"main-humidity-text\"> \n {{'%.1f' | sprintf:itemValue(config.humidity).split(' ')[0]}}\n </td>\n <td class=\"main-humidity-sign\">\n %\n </td>\n </tr>\n </table> \n </div>\n \n <div ng-if=\"config.show_carbondioxide == true\">\n <table class=\"sub-table\">\n <tr class=\"carb-row\">\n <td class=\"main-carb-icon\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'carbondioxide'\" size=\"18\"/> \n </td>\n <td class=\"main-carb-text\"> \n {{'%.1f' | sprintf:itemValue(config.carbondioxide).split(' ')[0]}} \n </td>\n <td class=\"main-carb-sign\"> \n ppm \n </td>\n </tr>\n </table>\n </div>\n \n <div ng-if=\"config.show_pressure == true\">\n <table class=\"sub-table\">\n <tr class=\"carb-row\">\n <td class=\"main-carb-icon\"> \n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'pressure'\" size=\"14\"/> \n </td>\n <td class=\"main-carb-text\"> \n {{'%.1f' | sprintf:itemValue(config.pressure).split(' ')[0]}} \n </td>\n <td class=\"main-carb-sign\"> \n mb \n </td>\n </tr>\n </table>\n </div>\n \n <table class=\"sub-table\">\n <tr class=\"carb-row\">\n <div ng-if=\"config.show_battery == true\">\n <td class=\"main-bat-icon\">\n <div ng-if=\"itemValue(config.battery)>=95\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-100'\" size=\"15\"/>\n </div>\n <div ng-if=\"itemValue(config.battery)>=85 && itemValue(config.battery)<95\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-90'\" size=\"15\"/>\n </div>\n <div ng-if=\"itemValue(config.battery)>=75 && itemValue(config.battery)<85\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-80'\" size=\"15\"/>\n </div>\n <div ng-if=\"itemValue(config.battery)>=65 && itemValue(config.battery)<75\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-70'\" size=\"15\"/>\n </div>\n <div ng-if=\"itemValue(config.battery)>=55 && itemValue(config.battery)<65\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-60'\" size=\"15\"/>\n </div>\n <div ng-if=\"itemValue(config.battery)>=45 && itemValue(config.battery)<55\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-50'\" size=\"15\"/>\n </div>\n <div ng-if=\"itemValue(config.battery)>=35 && itemValue(config.battery)<45\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-40'\" size=\"15\"/>\n </div>\n <div ng-if=\"itemValue(config.battery)>=25 && itemValue(config.battery)<35\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-30'\" size=\"15\"/>\n </div>\n <div ng-if=\"itemValue(config.battery)>=15 && itemValue(config.battery)<25\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-20'\" size=\"15\"/>\n </div>\n <div ng-if=\"itemValue(config.battery)<15\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'battery-10'\" size=\"15\"/>\n </div>\n </td>\n <td class=\"main-bat-text\">\n <div ng-if=\"itemValue(config.battery)>=0\">\n {{itemValue(config.battery)}}%\n </div>\n </td>\n </div>\n \n <td width=90%></td>\n \n <div ng-if=\"config.show_signal == true\">\n <td class=\"main-rf-icon\">\n <div ng-if=\"itemValue(config.signal)>=4\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'qualityofservice-4'\" size=\"12\"/>\n </div>\n <div ng-if=\"itemValue(config.signal)==3\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'qualityofservice-3'\" size=\"12\"/>\n </div>\n <div ng-if=\"itemValue(config.signal)==2\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'qualityofservice-2'\" size=\"12\"/>\n </div>\n <div ng-if=\"itemValue(config.signal)==1\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'qualityofservice-1'\" size=\"12\"/>\n </div>\n <div ng-if=\"itemValue(config.signal)<1\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'qualityofservice-0'\" size=\"12\"/>\n </div>\n </td>\n </div>\n </tr>\n </table> \n \n \t</td>\n </tr>\n</table>\n</a>",
"name": "Netatmo",
"author": "mag2000",
"description": "Simple Widget to display temperature, humidity and co2 or pressure",
"settings": [
{
"type": "string",
"id": "label",
"label": "Label"
},
{
"type": "item",
"id": "temperature",
"label": "Temperature"
},
{
"type": "checkbox",
"id": "show_humidity",
"label": "Show humidity",
"default": true
},
{
"type": "item",
"id": "humidity",
"label": "Humidity"
},
{
"type": "checkbox",
"id": "show_carbondioxide",
"label": "Show carbondioxide",
"default": true
},
{
"type": "item",
"id": "carbondioxide",
"label": "carbondioxide"
},
{
"type": "checkbox",
"id": "show_pressure",
"label": "Show pressure"
},
{
"type": "item",
"id": "pressure",
"label": "Pressure"
},
{
"type": "checkbox",
"id": "show_battery",
"label": "Show battery",
"default": true
},
{
"type": "item",
"id": "battery",
"label": "Battery"
},
{
"type": "checkbox",
"id": "show_signal",
"default": true,
"label": "Show signal"
},
{
"type": "item",
"id": "signal",
"label": "RF Signal"
},
{
"type": "string",
"id": "dashboard_name",
"label": "Target dashboard name"
}
]
}