Hi Guys,
I cant seem to have a nice square box that works as a button and illuminates when the Switch is on and Dims when its off.
These boxes work (circled in yellow) but they do not function as a button.
Id like a single button that toggles OFF, if ON and isnt illuminated. Then toggles ON, if OFF and illuminates
The code below works as a button, but fails to illuminate.
<div class="name">Music Cast</div>
<div class="sceneGroup">
<div class="scene" ng-if="itemValue('Garage_WXAD10_Power')=='OFF'" ng-click="sendCmd('Garage_WXAD10_Power', 'ON')">
<div class="name">Garage {{itemValue('Garage_WXAD10_Power')}}</div>
</div>
<div class="scene" ng-if="itemValue('Garage_WXAD10_Power')=='ON'" ng-click="sendCmd('Garage_WXAD10_Power', 'OFF')">
<div class="name">Garage {{itemValue('Garage_WXAD10_Power')}}</div>
</div>
The code that illimunates is below, but fails to work as a button
<div class="scene" ng-class="{true:'on', false:''}[itemValue('Yamaha_PartyMode')=='ON']"
ng-click="sendCmd('Yamaha_PartyMode_Toggle', 'ON')">Party mode
</div>
Some help would be great! thank you HabPanel gurus!
Cheers