How to use If Then statements in a rule

I must be missing something terribly obvious as I cannot figure this out.

I want a simple, in my mind, rule that allows me to push a button and if a switch is on then turn it off and if off then turn it on. Seems simple.

I can easily figure out how to set the button to turn the switch on when pushed but I can't figure out how to have it check, if on or if off, and then do the action.

Can someone point me in the right direction?

If SwitchA is on and button pushed then turn SwitchA off.
If SwitchA is off and button pushed then turn SwitchA on.


PS.. As soon as I post this I bet I figure it out. That's how it usually happens. :slight_smile:

That would be the "toggle" function.

Ahhh. Very nice. Found it. Makes much more sense. Thanks