Help - turning a specific outlet from a group back on

My rule machine skills are poor, and I don't know how to work with local variables - assuming they would even be applicable in this case.

I have ~10 zigbee outlets (A,B,C,D,E,F,G,H,I,J) that I want to leave on. How do I create a rule that will turn a specific outlet from a list of 10 back on.

What I can create in rule machine is that if any of the 10 turns off, a "turn on command" is sent to all 10. Or I can create a IF/THEN-ELSEIF/THEN-ELSEIF/THEN-....ENDIF chain with an ELSIF/THEN pair corresponding to each outlet.

But there's probably a simpler way to achieve this. Something like if any of the ten outlets turn off, put the name of that outlet into a variable, and then turn the variable back on.

Can someone help me? Please. I want my rules to become more efficient.


AFAIK, you can't set a variable to a device. You can set it to a device attribute, but not a device name or actual device.

The easiest way to do this would be to create a group of all the switches. Then, create RM rule that triggers if any of the outlets turn off. Then send a turn on command to the group device. It will figure out which outlets are on and off and turn on the outlet that got turned off.

Let the group device do the work for you. :slight_smile:

1 Like

That's really fast - thank you!

1 Like

Anytime! :slight_smile: