Attached is a project file programmed with the application described below.
We have a variable called “CCI” that has default state “less than 1 sec” and other state “more than 1 sec”.
We have then programmed a sequence with two steps. Step one will set the variable to “less than 1 sec” and after one second, step 2 will set the variable to “more than 1 sec”.
The CCI on the back of our keypad will be a conditional.
On the “close” tab, we only run an action that calls the first step of our sequence. This will start the sequence and if you close the CCI for more than one second, it will go to the second step in order to execute programming. If you close the CCI for less than one second, the open tab has programming to reset the CCI variable to “less than 1 sec” and it will not execute programming.
The open tab first has a conditional check, it asks if the variable is in the “more than 1 second state”. The only way the variable would be in that step is if you keep the CCI closed for more than one second. Then, the conditional checks if a light is off or on; if it is off, it turns it on. If it is on, it turns it off (but you can have anything programmed to toggle here, not just lights). At the end of the open tab, the CCI variable is reset to “less than 1 sec”.