When the button is pushed, sometimes it triggers, often times it does not. When it doesn't work right, the "log.debug buttonValue" doesn't run, so I know it's not calling appButtonHandler sometimes.
if(buttonName == 'controllerButton'){
if(state[buttonName + 'Value']) {
input buttonName, 'button', title: filterYesIcon + ' Filter', width:1
}
if(!state[buttonName + 'Value']){
input buttonName, 'button', title: filterNoIcon + ' Filter', width:1
}
return
}
def appButtonHandler(buttonValue){
log.debug buttonValue
switch(buttonValue) {
case 'controllerButton':
if(!state[buttonValue + 'Value']){
state[buttonValue + 'Value'] = true
break
}
state[buttonValue + 'Value'] = false
break
case 'controlButton':
if(!state[buttonValue + 'Value']){
state[buttonValue + 'Value'] = 1
break
}
if(state[buttonValue + 'Value'] == 1){
state[buttonValue + 'Value'] = 2
break
}
state.remove(buttonValue + 'Value')
break
[etc]