I wrote a Rule Machine rule to flash a lamp if either of two contact sensors are reporting open when the lamp is turned on.
- The lamp is a bedside lamp turned on prior to retiring for the night
- The contact sensors tell me if sliding doors are unlocked (open) or locked (closed)
So if the sliding doors are not both locked, the lamp flashes. This works great.
I would like the light to stop flashing once both contact sensors are closed. The problem is it stops in whatever state it is in when the last contact sensor is closed. So if the sliding door is locked and the contact sensor registers that when the flashing lamp is in the on state, the lamp remains on, without flashing, which is the desired behavior. But if the sliding door is locked and the contact sensor registers that when the flashing lamp is in the off state, the lamp remains off without flashing, which is NOT the desired behavior.
I think there is a better way to write this rule, so I'm requesting suggestions.