How do I set a button toggle action so that a single press turns on all lights and next press turns off all lights (i.e. not turn on any lights that are already off). Thanks!
One option would be to setup a Rule Machine rule:
Trigger: Button Press
Action:
If Private Boolean = True THEN
Turn on lights
Set Private Boolean to False
Else
Turn off lights
Set Private Boolean to True
END-IF
I do something similar with a pico button to toggle open/close a shade. You could use a button to toggle on/off a virtual switch to control a large group of lights. Or with a room Lighting Activator.
Couple questions (I'm a bit of a newbie)... won't the lights be out of sync if switched on or off manually? I've not used the if/then and private boolean settings... can you direct me to a tutorial?
Thanks!
Yes, if they are turned on/off manually, then they will be out of sync. It will be necessary to press the button a second time if they were turned on manually and you want them turned off. If you have a specific light that will always be in the desired state, then @bbrannon’s approach would be best.
As for how to use RM 5.1 and more specifically a Private Boolean, see the following:
There is a section near the end specifically on Private Booleans. Let me know if you get stuck.
Room lighting, though a bit complicated, provides the option of setting a state regardless of the current state.
Oh nice! I had pretty much all my automations setup already when Room Lighting came out, so never used it yet… Good to know though!

