<div flex layout="row" layout-align="space-around center"> <md-button ng-repeat="b in buttons" class="md-icon-button" ng-click="click(b)"> <ng-md-icon icon="{{b.state?b.iconTrue:b.iconFalse}}" ng-style="{color: b.state?b.colorTrue:b.colorFalse}"></ng-md-icon> </md-button></div>
<script>(function(scope) { scope.buttons = [{topic:'pp', iconFalse: 'pause', colorFalse: 'black', iconTrue: 'play_arrow', colorTrue: 'blue', state: false}]; scope.click = function(b) { }})(scope);</script>
This would be a nice option for the switch node: When pressing, the switch sends a command opposite to its current state, but is not updated immediately. Only incoming messages can change the state.