OK, so I employed a different strategy here.
Instead of different global variables for each button, I now us a single global variable (g0) as a bitmap. Bit 0 represents the first button and so forth.
Now the rules do a bit shift on the global variable and toggle that bit if off then I do a perform ‘Clear Top’ to clear all of the LEDs prior to sending the feedback. If the state of the button was on then I turn it off.
The disadvantage is that with bit shifting, rules are more complex however a single variable is 32 bits so you can control up to 32 on/of states with a single variable.
Bitwise operations are explained in this post.
Here is the updated project file.
Bome-2024-10-03.bmtp (6.4 KB)
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz