Rule for Garage Door with motion and time

Team, I'm looking for reason this rule does not seem to work...

Rule layout :
IF time is after sunset and before sunrise
No motion detected in garage
OR Garage Light is on

Close garage

IF motion is active, the rule should reset back to the original trigger ( Garage Door Open)

Here’s what I would do:

Use Required Expression:
Time between sunset and sunrise

Trigger (Same): Any Garage doors open

Wait event for Garage motion 1, 2, 3 stop and garage light off -> duration 30 minutes (that seems long…?)
Close Garage Doors

I assume that you want the garage door to close automatically after 30 minutes if the light has been off and there has been no motion for 30 minutes.

1 Like

I think you would need parentheses around the first condition as well as around the second/third conditions to allow the AND to function correctly but I'm never 100% sure with parentheses.

IF (time is after sunset and before sunrise)
(No motion detected in garage
OR Garage Light is on)

I would try Sebastien's method.

I can never remember the correct order that ANDs/ORs operate in conditional statements. With parentheses I don't have any doubt.


One thing to consider with your rule. What happens if the door opens 5 minutes before sunset? It won't pass the time condition or the time Required Expression and the rule won't close the garage door. You many want to add a sunset trigger. If you stick with the Delay option then make it cancelable and add a Cancel Delayed Actions before it but personally I prefer Sebastien's suggestion with the Wait.

1 Like

Or move the time condition later... Trigger whenever the door opens, then wait for the condition that it's nighttime and everything is idle. Once that wait completes, you can check the state of the door -- or just close it, since the driver should ignore a close() command when it's already closed.

Correct- The garage lights operate off the motion sensors.

Problem seems to be that when the garage door starts to close, it triggers the lights to be on.
I'm going to remove this portion. I was using t his as a back up but do not think its really needed.

IT works but some nights it does not work properlly.

Im going to rework this today based on your outline and see if it triggers properly.
I will report back

1 Like