Hi, do you mean press once, to enable and press again to disable?
This would be called ‘toggle’ behavior and yes it is possible. If that is what you are looking for I can show you and example.
If you want forty 2 state buttons, we could also do that with only 2 variables using 1 bit per button. An example would be shown on this post where I did that for 64 buttons of an AkaiPro APC-MINI.
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz