Motion-automated bathroom lights

Hello,
I have some questions about a rule I have for automating my bathroom lighting... Instead of using Mode Manager, I have them built into the rules I use, because only having 3 Modes doesn't really work for what I prefer (i.e., morning when waking up/getting ready, daytime, evening, sleep time). I have the first part of the rule built to set the lights per "Mode." The second part of the rule is to shut the lights off when there's no activity, unless the humidity levels are high, which I have in there so the lights don't shut off while showering if the motion sensors don't pickup the motion in the shower through the fogged-up glass (I have the bathroom fan setup on a separate rule to automate based on humidity levels too).

I'm running into issues with the lights not always setting to the right level... like during the day, it'll set to 25%, even though it should be at 80%. I'm also wondering if there's a way that if the lights aren't at one of the designated dimming levels (i.e., 25%, 80%, 50%, or 1%) that the lights will stay at whatever level's set until the lights are shut off - basically, say I'm in the bathroom and set the lights to 100% because I'm shaving and want to have full-light, that the lights don't dim back down to 50% on me because it's "evening." One thought I had was to get Zigbee buttons that, if pressed, pause the rule until the lights are shut off, but if I don't have to invest in buttons and setup those additional rules because I can tweak my current rules, that would be ideal.

Below is how my rule is currently setup. Any feedback would be greatly appreciated!

Select Trigger Events (ANY will trigger)

Guest Bathroom Motion Sensor changed
Guest Toilet Motion Sensor changed

Select Actions for Guest Bathroom Lights

IF (Guest Bathroom Motion Sensor active(F) OR
Guest Toilet Motion Sensor active(F) AND
Time between 6:00 AM CST and 8:00 AM CST(F) AND
Guest Bathroom Lights(off) is off(T) [FALSE]) THEN
Cancel Delayed Actions
Dim: Guest Bathroom Lights: 25
ELSE-IF (Guest Bathroom Motion Sensor active(F) OR
Guest Toilet Motion Sensor active(F) AND
Time between 8:00 AM CST and Sunset-30 minutes(T) AND
Guest Bathroom Lights(off) is off(T) [FALSE]) THEN
Cancel Delayed Actions
Dim: Guest Bathroom Lights: 80
ELSE-IF (Guest Bathroom Motion Sensor active(F) OR
Guest Toilet Motion Sensor active(F) AND
Time between Sunset-30 minutes and 10:00 PM CST(F) AND
Guest Bathroom Lights(off) is off(T) [FALSE]) THEN
Cancel Delayed Actions
Dim: Guest Bathroom Lights: 50
ELSE-IF (Guest Bathroom Motion Sensor active(F) OR
Guest Toilet Motion Sensor active(F) AND
Time between 10:00 PM CST and 6:00 AM CST(F) AND
Guest Bathroom Lights(off) is off(T) [FALSE]) THEN
Cancel Delayed Actions
Dim: Guest Bathroom Lights: 1
END-IF
IF (Guest Bathroom Motion Sensor inactive(T) AND
Guest Toilet Motion Sensor inactive(T) [TRUE]) THEN
Off: Guest Bathroom Lights --> delayed: 0:05:00 (cancelable)
ELSE-IF (Humidity of Guest Bathroom Temperature/Humidity Sensor(29.4) is > Ambient Temperature/Humidity Sensor(32.7) +10(F) AND
Guest Bathroom Lights(off) is on(F) [FALSE]) THEN
Wait for event: Humidity of Guest Bathroom Temperature/Humidity Sensor(29.4) is <= Ambient Temperature/Humidity Sensor(32.7) +5
Wait for event: Guest Toilet Motion Sensor, Guest Bathroom Motion Sensor any inactive
Off: Guest Bathroom Lights --> delayed: 0:05:00 (cancelable)
END-IF

I think you have a couple separate issues.

You can make as many modes as you want. If those pre-defined ones aren't appropriate, make more. I have 5 modes that I use.

And while you are using Rule Machine, I don't know if that is the best way to do things. Did you try the built in Motion Lighting app?

It is also hard to read your cut/pasted rule, a screenshot would be much easier to sort through and see how you have it laid out.

1 Like

I'm not a RM guy, but maybe you could use a door contact sensor to prevent other automations from firing. I use that to prevent the light and fan from turning off when in the shower or tub, or on the throne. Also, at night, the lights and fan don't come on until the door is closed, and both shut off when the door opens to prevent disruption to the sleeping person.

My point is, a door contact sensor could be useful.

I agree with @neonturbo. You are probably better off using motion lighting and possibly adding additional modes. Motion lighting can be set to use different brightnesses/color temps and shut off times by mode, and also can use a variety of triggers to prevent auto-on/auto-off. It can also be configured to disable changes to dimmer level when the level is changed manually.

1 Like

Thanks for the tip on adding/changing pre-set Modes. I couldn't figure that out within Mode Manager, so I didn't realize it could be adjusted elsewhere... That made streamlining the automation a bit easier. Here's what it looks like now:

@EdMcW - configuring them to not change after being changed manually would be nice. Can you include based on humidity to address the lack of motion while showering issue?

In motion lighting, you can use virtual switches to override turning the lights on or off. So you could have a simple rule evaluate humidity, and set a virtual switch "on" if humidity is too high.

1 Like

@nathaniel.knautz this is what I do to keep the lights on based on humidity.

I also have virtual switches for each room in the house called ā€˜Living Room Overrideā€™, ā€˜Upstairs Bathroom Overrideā€™, etc. the motion lighting rules in each room are disabled whenever those switches are on, and I have picos in each room where a long press on the middle button toggles the override switch. All of the overrides will eventually turn themselves back off automatically. (After how long varies depending on the room.)

1 Like

I do the same override with a simple automation and double tapping certain switches (which have that feature). The center button of the Pico also would be a terrific way to do these overrides.

1 Like