# Window door sensor automation

**URL:** <https://community.homey.app/t/window-door-sensor-automation/98881>\
**Category:** Questions & Help\
**Tags:** zigbee, flow, homey-pro, advancedflow\
**Created:** [December 25, 2023, 8:12am UTC](https://community.homey.app/t/window-door-sensor-automation/98881 "2023-12-25T08:12:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aamir\_Waseem](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Aamir\_Waseem](https://community.homey.app/u/Aamir_Waseem)\
**Post date:** [December 25, 2023, 8:12am UTC](https://community.homey.app/t/window-door-sensor-automation/98881/1 "2023-12-25T08:12:02Z")

</div>

I’m new to automation, and Homey Pro is the first hub I’ve started using.

Could you assist me in setting up a flow? I have a window/door sensor on my door, and I’d like Alexa to announce when the door is open. I’ve managed most of it, but I’m struggling with ensuring the second announcement only happens if the door remains open after 10 minutes. Also, I want to avoid any announcement if the door is closed.

Any help would be appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [December 25, 2023, 11:45am UTC](https://community.homey.app/t/window-door-sensor-automation/98881/2 "2023-12-25T11:45:38Z")

</div>

Show the flow that you have made already.

---

<div class="post-metadata">

**Author:** ![Aamir\_Waseem](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Aamir\_Waseem](https://community.homey.app/u/Aamir_Waseem)\
**Post date:** [December 26, 2023, 12:39am UTC](https://community.homey.app/t/window-door-sensor-automation/98881/3 "2023-12-26T00:39:07Z")

</div>

I have tried these options.

 ![Screen Shot 2023-12-26 at 11.36.01 am](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/3/83c1614bb8c9ca959fb66d20f993c72d909c37e1.png)  
 ![Screen Shot 2023-12-26 at 11.35.38 am](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/9/29020a1f9fccccafb9080a2a1dc9ccccd362c8fb.jpeg)

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [December 26, 2023, 4:11am UTC](https://community.homey.app/t/window-door-sensor-automation/98881/4 "2023-12-26T04:11:14Z")

</div>

In the second flow you have to test again if the door is open, before sending the second message.  
However, if you want to cope with the door being closed (and open again) you have to introduce a timer or work with zone activity. The timer starts when the door opens and stops when the door is closed. When the timer ends, the message is send. So a total of 3 flows. The problem is very simular to having a motion sensor to switch on and of a light.

Creating a zone is most simple  
WHEN the door\_zone is active for one minute THEN give message1  
WHEN the door\_zone is active for 10 minutes THEN give message2

---

<div class="post-metadata">

**Author:** ![Aamir\_Waseem](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Aamir\_Waseem](https://community.homey.app/u/Aamir_Waseem)\
**Post date:** [December 26, 2023, 7:06am UTC](https://community.homey.app/t/window-door-sensor-automation/98881/5 "2023-12-26T07:06:18Z")

</div>

Thanks for the information. I will try this and will update you.
