im HABPanel ganz einfache + und - Buttons erzeugt.
Das Slider Widget war mir zur Einstellung der Lautstärke am Verstärker zu ungenau denn ab und zu hat man
ruckzuck die Lautstärke zu Laut eingestellt.
hier der Code:
Code: Alles auswählen
<style>
table{
width: 100%;
margin: 0;
padding: 0;
}
td{
width: 33.3333333333%;
position: relative;
}
td:after {
content: '';
display: block;
margin-bottom: 100%;
}
button {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 57%;
border: 0;
color: #def;
outline: none;
background: #234;
font-size: 20px
}
button:active
{
filter: brightness(130%);
-webkit-filter: brightness(130%);
}
</style>
<table>
<tr>
<td>
<button ng-click="sendCmd('DenonAVRX2000_MainZone_Volume', +itemValue('DenonAVRX2000_MainZone_Volume') - 0.5 < 0 ? 0 : +itemValue('DenonAVRX2000_MainZone_Volume') - 0.5)">
<i class="glyphicon glyphicon-minus"></i>
</button>
</td>
<td>
<button>
{{itemValue('DenonAVRX2000_MainZone_Volume') + " "}}
</button>
</td>
<td>
<button ng-click="sendCmd('DenonAVRX2000_MainZone_Volume', +itemValue('DenonAVRX2000_MainZone_Volume') + 0.5 > 30 ? 30 : +itemValue('DenonAVRX2000_MainZone_Volume') + 0.5)">
<i class="glyphicon glyphicon-plus"></i>
</button>
</td>
</tr>
</table>
Viel Spass damit.