Time Delay

I have a magnetic switch on my garage door hooked up to the dry contacts in an Aeotec Door / Window Sensor 7 Pro. I want the garage lights to:

  1. Go on when the door opens
  2. Go off five minutes after the door closes

The garage lights are controlled by a Honeywell Z-Wave wall switch.

The #1 is easy to do with SmartApps / SmartLighting. The opening of the contacts in the Aeotec sensor activates an Automation to turn the light on.

I can’t figure out a way to do #2. Is there a way to initiate a time delay after the sensor detects the contacts went closed (door closed) and then turn the lights off when the time expires?

In Smart Lighting when you turn on a switch when a contact sensor opens, you get the option to turn it off again when the contact sensor closes and that includes a delay. That is implemented sensibly so if it opens again the timer is cancelled.

If you want to do it using Automations I believe you need two. One for the open and one for the close. For that close the condition includes the option to say how long you want the status to remain as closed before the automation is activated and that is where you get the delay. If you try to do it in one Automation I don’t think you can stop the timer action still happening if the door opens again.

In the Rules API as documented, there doesn’t seem to be a way to do it. The functionality must be there somewhere as the Automations use it, but it isn’t documented for public use yet. You can do the timer but you can’t stop it.

1 Like

As say @orangebucket , it works best with smart lighting for now.
I would add that the light comes on when the door is opened and the light is off. Thus, if you turn it on manually, the automation is canceled if someone opens the door and you are in the garage doing something it will not turn off.