Door sensors

Hello nall

Never used a door sensor

Next week i will install my first door sensor.

I will use it to turn on several lights… easy. These lights will be turned off when presence detected and it will turn on other lights… Sofar so good.
My question ?

as i open the door the light goes on. what happens if i close immediately the door?
I see that closing the door immediately will do nothing and if the door is close twice the light will go off.

If the door is closed once and then the door is opened once again a few minutes later will the light turn on?

Thank you for your help in advance

The beauty with Home Assistant is that it’s really all up to you. What do YOU want to have happen? Just think thru all (or as many as you can) use-cases and scenarios and plan your automation(s) accordingly.

I have a door sensor on our backyard door, when it’s after sunset it turns on the back porch lights and starts a timer for 5 minutes. When the timer finishes, the lights turn off. Additional openings/closings of the door, for me, do nothing - as too many scenarios exist where the lights could turn off at the 2nd opening, and it’s just someone else coming outside vs. the original person returning inside.

Like I said, you can craft / create whatever you want - just need to think through what that is and create automations / conditions accordingly.

Community here is happy to help if you have specific use-case where you’re getting stuck :slight_smile:

1 Like

Thank you for this reply

I will implement this in a new media room i extracted in the loft of the house
my scenario is to turn on the light when the door opens and stays on until and if the amplifier is on and other lights turn on.

This is easy and is already mapped.

In your situation once you open the door and the light turns on and you close your door the light still remains on until the 5 minutes are up. correct?

Then if someone opens the door (once the 5 minutes are up and the light is off) the light will turn on. Correct? and the cycle restarts

If So : this is perfect for my scenario

Now all i need is to figure out who to turn on the lights when i’m prepared to leave the room looks like i will need an additional motion sensor that will turn on the stairs turn off and all other lights then like you set the off of the lights on a timer then when i open the door nothing happens. Then once the timer has run through, and some one opens the door the stair lights will turn on again and the cycle restarts.

Brilliant

Thank you for your time , patience and help

thank you

That’s correct.

The first automation triggers on the door being opened. Conditions of the light being off and the sun being below the horizon. Action of starting a 5min timer and turning on the light.

The second automation triggers on the timer being finished, condition of the light being on and action of turning off the light.

Upside is I can manually turn on the light and neither of these automations will ‘automatically’ turn the light off for me. Other upside is door can open/close numerous times without toggling the light. Last upside is I can still manually turn off the light.

Downside is if someone is outside for longer than 5 minutes (and the light wasn’t manually turned on before door was opened) is the light turns off, regardless if they’re still outside.

I haven’t used motion sensors or cameras with people detection to make it more accurate - as I’ve learned that sometimes good enough is, well, good enough. Don’t let perfect be the enemy of good :wink:

@Markus99

Thanks Mate

Action one and 2 are very logical.

I will be using Shelly door sensors. My electrician will be here next wednesday.

How are you wiring the lighty to be able to use the switch without loosing the connectivity to the light?

Are you perhaps using light toggle instead of turning on or off the light in your automation?
if this is the case would when the door opens the light is toggled,

therefore regardless of the state of the light the opening the door will change the state of the light?

Yes opening and/or closing the door during the 5 minutes is an issue.

In this case i believe using a stoptimer (in node red) and a check of presence should resolve this

Many thanks

Personally I’m using Aqara Zigbee based door/window sensors and Jasco ZWave switches to control the light.

I am using specific turn_on and turn_off calls in the automations - no toggles in this case.

Thank you for this reply