-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathHmiP-eTRV-2.widget.json
executable file
·57 lines (57 loc) · 11.5 KB
/
HmiP-eTRV-2.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
{
"template": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>Widget for HmIP-eTRV-2</title>\n <meta charset=\"utf-8\"></meta>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"></meta>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\"></link>\n <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js\"></script>\n <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\"></script>\n</head>\n<body>\n <script type=\"text/ng-template\" id=\"mySetTemp.html\">\n <!-- Set Point -->\n <div ng-init=\"setpointmodel={ \n name: 'Setpoint', \n item: config.genericname+'_TempSet', \n floor: 10, \n ceil: 35, \n step: 0.5,\n hidelabel: true,\n unit: '°C'\n }\">\n <widget-slider ng-model=\"setpointmodel\"></widget-switch>\n </div>\n </script>\n <widget-icon ng-if=\"config.backdrop\" iconset=\"config.backdrop_iconset\" icon=\"config.backdrop\"\n backdrop=\"true\" center=\"true\">\n </widget-icon>\n\t<h5 ng-if=\"ngModel.name\">\n {{ngModel.name}}\n </h5>\n\n <div class=\"container-fluid\">\n <div class=\"row\" ng-if=\"(getItem(config.genericname+'_Humidity') != 'N/A')\">\n <div class=\"col-sm-3\" style=\"text-align:center;\">\n <span ng-click=\"openModal('mySetTemp.html', true, 'lg')\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'heating'\" \t\t size=\"32\" state=\"(itemState(config.genericname+'_TempSet')-config.minTemp)*100/(config.maxTemp-config.minTemp)\" />\n </span>\n <button class=\"btn btn-link\" style=\"margin-top:-7px; margin-left:-9px\" ng-click=\"openModal('mySetTemp.html', true, 'lg')\">TempSet\n </button>\n </div>\n <div class=\"col-sm-3\" ng-if=\"(itemState(config.genericname+'_TempAct') - itemState(config.genericname+'_TempSet')) > 0.5\">\n <span>\n <widget-icon iconset=\"'custom-icon'\" \t\t\t\t\t icon=\"'hmip_etrv_thermometer'\" size=\"32\" state=\"'hot'\"/>\n </span>TempAct\n </div>\n <div class=\"col-sm-3\" ng-if=\"(itemState(config.genericname+'_TempSet') - itemState(config.genericname+'_TempAct') < 0.6) && (itemState(config.genericname+'_TempAct') - itemState(config.genericname+'_TempSet') < 0.6)\">\n <span>\n <widget-icon iconset=\"'custom-icon'\" \t\t\t\t\t icon=\"'hmip_etrv_thermometer'\" size=\"32\" state=\"'warm'\"/>\n </span>TempAct\n </div>\n <div class=\"col-sm-3\" ng-if=\"(itemState(config.genericname+'_TempSet') - itemState(config.genericname+'_TempAct')) > 0.5\">\n <span>\n <widget-icon iconset=\"'custom-icon'\" \t\t\t\t\t icon=\"'hmip_etrv_thermometer'\" size=\"32\" state=\"'cold'\"/>\n </span>TempAct\n </div>\n <div class=\"col-sm-3\">\n <span>\n <widget-icon iconset=\"'custom-icon'\" \t\t\t\t\t\t\t\ticon=\"'hmip_etrv_window'\" \t\t size=\"32\" state=\"itemState(config.genericname+'_WindowState')\"/>\n </span>Window\n </div>\n <div class=\"col-sm-3\">\n <span>\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" \ticon=\"'humidity'\"\t\t\t\t \t\t size=\"32\"/>\n </span>Humidity\n </div>\n </div>\n <div class=\"row\" ng-if=\"(getItem(config.genericname+'_Humidity') == 'N/A')\">\n <div class=\"col-sm-4\" style=\"text-align:center;\">\n <span ng-click=\"openModal('mySetTemp.html', true, 'lg')\">\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'heating'\" \t\t size=\"32\" state=\"(itemState(config.genericname+'_TempSet')-config.minTemp)*100/(config.maxTemp-config.minTemp)\" />\n </span>\n <button class=\"btn btn-link\" style=\"margin-top:-7px; margin-left:-9px\" ng-click=\"openModal('mySetTemp.html', true, 'lg')\">TempSet\n </button>\n </div>\n <div class=\"col-sm-4\" ng-if=\"(itemState(config.genericname+'_TempAct') - itemState(config.genericname+'_TempSet')) > 0.5\">\n <span>\n <widget-icon iconset=\"'custom-icon'\" \t\t\t\t\t icon=\"'hmip_etrv_thermometer'\" size=\"32\" state=\"'hot'\"/>\n </span>TempAct\n </div>\n <div class=\"col-sm-4\" ng-if=\"(itemState(config.genericname+'_TempSet') - itemState(config.genericname+'_TempAct') < 0.6) && (itemState(config.genericname+'_TempAct') - itemState(config.genericname+'_TempSet') < 0.6)\">\n <span>\n <widget-icon iconset=\"'custom-icon'\" \t\t\t\t\t icon=\"'hmip_etrv_thermometer'\" size=\"32\" state=\"'warm'\"/>\n </span>TempAct\n </div>\n <div class=\"col-sm-4\" ng-if=\"(itemState(config.genericname+'_TempSet') - itemState(config.genericname+'_TempAct')) > 0.5\">\n <span>\n <widget-icon iconset=\"'custom-icon'\" \t\t\t\t\t icon=\"'hmip_etrv_thermometer'\" size=\"32\" state=\"'cold'\"/>\n </span>TempAct\n </div>\n <div class=\"col-sm-4\">\n <span>\n <widget-icon iconset=\"'custom-icon'\" \t\t\t\t\t\t\t\ticon=\"'hmip_etrv_window'\" \t\t size=\"32\" state=\"itemState(config.genericname+'_WindowState')\"/>\n </span>Window\n </div>\n </div>\n\n <div class=\"row\" ng-if=\"(getItem(config.genericname+'_Humidity') != 'N/A')\">\n <div class=\"col-sm-3\">\n <span style=\"color: red; font-size: 10pt; text-align:center\">\n <button class=\"btn btn-link btn-sm\" style=\"color: cyan; font-size: 10pt; margin-top:-6px; margin-left:-9\"\n ng-click=\"openModal('mySetTemp.html', true, 'lg')\">\n {{itemState(config.genericname+'_TempSet')}}°C\n </button>\n </span>\n </div>\n <div class=\"col-sm-3\">\n <span style=\"color: cyan; font-size: 10pt\">{{itemState(config.genericname+'_TempAct')}}°C\n </span>\n </div>\n <div class=\"col-sm-3\">\n <span style=\"color: cyan; font-size: 10pt\">{{itemState(config.genericname+'_WindowState')}}\n </span>\n </div>\n <div class=\"col-sm-3\">\n <span style=\"color: cyan; font-size: 10pt\">{{itemState(config.genericname+'_Humidity')}}%\n </span>\n </div>\n </div>\n <div class=\"row\" ng-if=\"(getItem(config.genericname+'_Humidity') == 'N/A')\">\n <div class=\"col-sm-4\">\n <span style=\"color: red; font-size: 10pt; text-align:center\">\n <button class=\"btn btn-link btn-sm\" style=\"color: cyan; font-size: 10pt; margin-top:-6px; margin-left:-9\"\n ng-click=\"openModal('mySetTemp.html', true, 'lg')\">\n {{itemState(config.genericname+'_TempSet')}}°C\n </button>\n </span>\n </div>\n <div class=\"col-sm-4\">\n <span style=\"color: cyan; font-size: 10pt\">{{itemState(config.genericname+'_TempAct')}}°C\n </span>\n </div>\n <div class=\"col-sm-4\">\n <span style=\"color: cyan; font-size: 10pt\">{{itemState(config.genericname+'_WindowState')}}\n </span>\n </div>\n </div>\n \n <div class=\"row\">\n <div class=\"col-xs-4\">\n <div class=\"btn-group\" uib-dropdown>\n <button id=\"single-button\" type=\"button\" class=\"btn-xs btn-primary\" uib-dropdown-toggle ng-if=\"itemState(config.genericname+'_Profile') == '1'\">\n {{config.profile1Name}}<span class=\"caret\"></span>\n </button>\n <button id=\"single-button\" type=\"button\" class=\"btn-xs btn-primary\" uib-dropdown-toggle ng-if=\"itemState(config.genericname+'_Profile') == '2'\">\n {{config.profile2Name}}<span class=\"caret\"></span>\n </button>\n <button id=\"single-button\" type=\"button\" class=\"btn-xs btn-primary\" uib-dropdown-toggle ng-if=\"itemState(config.genericname+'_Profile') == '3'\">\n {{config.profile3Name}}<span class=\"caret\"></span>\n </button>\n <ul class=\"dropdown-menu\" uib-dropdown-menu role=\"menu\" aria-labelledby=\"single-button\">\n <li role=\"menuitem\"><a ng-click=\"sendCmd(config.genericname+'_Profile', '1')\">{{config.profile1Name}}</a></li>\n <li role=\"menuitem\"><a ng-click=\"sendCmd(config.genericname+'_Profile', '2')\">{{config.profile2Name}}</a></li>\n <li role=\"menuitem\"><a ng-click=\"sendCmd(config.genericname+'_Profile', '3')\">{{config.profile3Name}}</a></li>\n </ul>\n </div>\n </div>\n <div class=\"col-xs-2\" style=\"color: cyan; font-size: 8pt; font-weight: bold\" ng-if=\"itemState(config.genericname+'_BatteryStatus') == 'ON'\">\n <span>\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'lowbattery'\" size=\"24\" />\n </span>battery low\n </div>\n <div class=\"col-xs-2\" style=\"color: cyan; font-size: 8pt; font-weight: bold\" ng-if=\"itemState(config.genericname+'_UpdatePending') == 'ON'\">\n <span>\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'settings'\" \tsize=\"24\" />\n </span>new firmware\n </div>\n <div class=\"col-xs-2\" style=\"color: cyan; font-size: 8pt; font-weight: bold\" ng-if=\"itemState(config.genericname+'_PartyMode') == 'ON'\">\n <span>\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'party'\" \t\t size=\"24\" />\n </span>partymode\n </div>\n <div class=\"col-xs-2\" style=\"color: cyan; font-size: 8pt; font-weight: bold\" ng-if=\"itemState(config.genericname+'_BoostTime') > 0\">\n <span>\n <widget-icon iconset=\"'eclipse-smarthome-classic'\" icon=\"'fire'\" \t\t size=\"24\" />\n </span>Boost time {{itemState(config.genericname+'_BoostTime')}}sec\n </div>\n </div>\n </div>\n </body>\n</html>\n",
"name": "eTRV-2 widget for Homematic-IP",
"author": "Michael Rossner",
"description": "Manipulate the HmIP-eTRV-2 Homematic-IP element",
"settings": [
{
"type": "string",
"id": "genericname",
"label": "GenericName",
"description": "Add generic name of item. Items with names <generic>+(_TempAct, _TempSet, _BatteryStatus, _UpdatePending, _BoostMode, _PartyMode) are required"
},
{
"type": "icon",
"id": "backdrop",
"label": "Icon",
"description": "Background Icon"
},
{
"type": "number",
"id": "minTemp",
"label": "minimal temperature",
"default": "12",
"description": "minimum temperature of the thermostat"
},
{
"type": "number",
"id": "maxTemp",
"label": "maximum temperature",
"default": "30",
"description": "minimum temperature of the thermostat"
},
{
"type": "string",
"id": "profile1Name",
"label": "profile1Name",
"default": "auto",
"description": "name for profile 1"
},
{
"type": "string",
"id": "profile2Name",
"description": "name for profile 2",
"default": "absense",
"label": "profile2Name"
},
{
"type": "string",
"label": "profile3Name",
"id": "profile3Name",
"default": "vacation",
"description": "name for profile 3"
}
],
"source_url": "https://raw.githubusercontent.com/Rosi2143/habpanel-widget-HMIP-eTRV-x/master/HmiP-eTRV-2.widget.json",
"readme_url": "https://github.com/Rosi2143/habpanel-widget-HMIP-eTRV-x"
}