Hi all,
I found this code in here, i have tried to write to the author, but i have not recived any reply, therefore i try some help by posting a new tropic in case anyone, want to help me
here is the code for the HABpanel widget:
<div ng-init="ServerPath='/static'; IconSet='nest'"></div>
<table style="width: 100%; border-collapse: separate; border-spacing: 4px;">
<tr>
<td colspan=3 style="padding: 0;"><h4 style="color: #ffaa00; line-height: .1em;">Nest Protect Livingroom</h3></td>
</tr>
<tr>
<td style="border: 2px solid #76899e; border-radius: 10px;">
<table style="width: 100%;">
<tr>
<td rowspan="4" style="padding: 0px; padding-top: 0px; padding-bottom: 0px"><img id="nest-icon" height="80" width="80" src="{{ServerPath}}/images/{{IconSet}}/nest-protect-glow-blue.png"/></td>
<td style="padding-left: 10px; padding-right: 10px; padding-top: 0px; padding-bottom: 0px">Røg:</td>
<td style="padding-left: 10px; padding-right: 10px; padding-top: 0px; padding-bottom: 0px" ng-style="{ color: itemValue('nest_bryggers_smoke')=='ok' ? 'green' : 'red' }">{{itemValue('nest_bryggers_smoke')}}</td>
</tr>
<tr>
<td style="padding-left: 10px; padding-right: 10px; padding-top: 0px; padding-bottom: 0px">CO2:</td>
<td style="padding-left: 10px; padding-right: 10px; padding-top: 0px; padding-bottom: 0px" ng-style="{ color: itemValue('nest_bryggers_co2')=='ok' ? 'green' : 'red' }">{{itemValue('nest_bryggers_co2')}}</td>
</tr>
<tr>
<td style="padding-left: 10px; padding-right: 10px; padding-top: 0px; padding-bottom: 0px">Sidst online:</td>
<td style="padding-left: 10px; padding-right: 10px; padding-top: 0px; padding-bottom: 0px">{{itemValue('nest_bryggers_lastconnection') | date:'dd-MM-yyyy HH:mm'}}</td>
</tr>
</tr>
</table>
</td>
</tr>
</table>
My problem is following:
- The “status” is OK in RED, as fare as I can understand, its schould be OK = Green, Warning = Yellow, Alarm= Red
- I dont understand the image patch, i dont know where to copiy the images to? //openHAB-share\openhab2-conf\html?
- I have 5 Nest protects, and i would like to implement all of them in this code, but every time i try something, either it gives an error or its looks hopeless
I hope that i can get some help
Best regards
Peter