Another "help with a rule" thread

I have two outdoor fixtures next to the front door, with Sengled zigbee color bulbs. I would like one of the bulbs to turn green when the door is unlocked. Why... I'll see someone walking up the driveway and push the unlock button from my office, and they'll either ring the bell or attempt to enter an unlock code (after I've already unlocked), which means they're locking the door.

Seems simple, but nothing is simple. At night these lights are on at 33% and when Blue Iris detects motion they raise to 100% along with a few other outdoor lamps. The point is that after the door is re-locked, I need the light that was green to fall back in sync with the other lamps.

I tried using the group bulb as a reference in an IF-THEN but I'm sure the way I'm doing this could be done better. And the way I set this up isn't working reliably, its flaky. I saw a color toggle option, but I'm not sure that does what I want it to do. Here's a screen shot of what I've got so far. Any input would be appreciated!

This will turn the bulb off if it's on or on to the specified color if it's off.

Otherwise, as long as you want the light to turn on to green when the door is unlocked then either back to 33% at 2700K or off when the door locked again, what you have looks like it should work. Technically, you're missing an END-IF after this IF THEN... block, but since it's the last "action," RM will infer it just fine and it won't really cause problems.

There is also the "Capture" action for bulbs/dimmers/switches and the corresponding "Resotre" option that can more or less do what you're doing here, but some people actually prefer to do it how you are because if if was off, that was all it wil restore, not the previous color/CT, which confuses some people, and manually setting things back to something like you're doing may be preferable.

Download the Hubitat app