Could someone tell me why the following snippet of code doesn’t run. In the logging all the variables are correct but the second IF never executes. Thanks for any help.
Here are the log entries. As you can see everything is on and or false as required. The other entry is after the switch is turned back off in the same routine. These are in reverse order as that is the way they are in the log.
10:56:02 AM: debug Camera Switch handler called, off, false, [on]
10:56:02 AM: debug Camera Switch handler called, on, false, [on]
The debug output says enable.currentswitch is [on] which I guess is either a string with brackets in it or a list. Does comparing that with “on” really return true? (My Groovy is rudimentary).