Here's what I want to happen.
- Toddler gets out of bed. Motion detector under bed sees this. There are LED strips under his dresser. They should turn on warm white at level 3. The bathroom has a nightlight on a smart switch (technically it's the exhaust fan). It should turn on. This should only happen if the mode is night or sleeping.
- Once motion in the bedroom ends, a timer should start. I think maybe 1 minute (bathroom is literally right across the hall, it should take way less than 1 minute). It's possible the motion was triggered by us checking on him or one of the cats. If the motion sensor in the bathroom detects nothing after 1 minute, turn the lights back off and the rule should end.
- Motion is detected in the bathroom. The lights should stay on until motion is detected in the bedroom again. Once motion in the bedroom has been detected and then not detected for 30 seconds, all the lights should turn back off and the rule end.
With rules being event driven, I'm not really sure how to structure this in RM. I already have the logic to turn the lights on, and a local boolean called visitedBathroom set to false.
I've looked around a the various actions I can add after turning the lights on, and they seem close to what I want, but not quite. I see "wait for events" which I can use once motion in the bathroom has been detected. I
And somehow, just changing the different actions around broke the rule completely. I can't click "select actions to run" without this error coming up in the log, so time to delete and restart I guess.