I’ve got the below rule in RM which simply turns on the light in my office when the motion sensor detects motion and lux is below 5. After no motion is detected for a minute the light goes off:
I want to add a second rule to turn the light green for 30 seconds when a presence sensor arrives and then return to previous state.
My question is if I’m in the office the first rule triggers the light based on motion. If the other half then arrives home the light will turn green for 30 seconds. How do I then get the light to return back to daylight if it was previously active or off in not previously active?
I’m sure RM can do it but I’m still learning the ropes with the app so any help would be greatly appreciated,
You could use a private Boolean to keep track of the state of the lights. Add logic to your current rule to set a Boolean to true on the presence conditional trigger, and use the Boolean as the condition.
If true, turn light green, and then turn back to on. If false turn green, and then, turn back off.
Does that help?
bamarayne
(Jason "The Enabler" as deemed so by @Smart)
5
Abe, this is simple. Give more a little bit Abe I’ll write it up for you