# Trigger alarm if garage door has been opened for more than X minutes

**URL:** https://community.homey.app/t/trigger-alarm-if-garage-door-has-been-opened-for-more-than-x-minutes/38349
**Category:** Flows
**Tags:** zigbee
**Created:** [December 1, 2020, 12:16pm UTC](https://community.homey.app/t/trigger-alarm-if-garage-door-has-been-opened-for-more-than-x-minutes/38349 "2020-12-01T12:16:29Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)
#### Post date: [December 1, 2020, 12:40pm UTC](https://community.homey.app/t/trigger-alarm-if-garage-door-has-been-opened-for-more-than-x-minutes/38349/2 "2020-12-01T12:40:30Z")

</div>

Hi, and welcome to the Homey user and the community.

I don’t know exactly how do you want to manage this with a motion sensor. I personally would use one (or two = garage door closed) door/window sensors. But maybe this works quite well with a motion sensor, I don’t know.

Maybe this thread is helpful. If not, let us know. We will find a solution, because it is not really difficult.

> [@Gate open timer - incrementing logic variables](https://community.homey.app/t/gate-open-timer-incrementing-logic-variables/33821):
>
> I am trying to create a flow which gives an alert if I have left my gates open after a period of time. I created a variable “Gatetimer” and set it to zero. when the gates open I set it to 1, and then “try” and increment the variable by 1 every minute they are still open. My problem is that my Logic arithmetic doesn’t work. After it triggers I gat back a value of “NaN”. I have attached the picture of the flows below. Can anyone tell me what I have done wrong? And if there is a simpler way of…

---

_[View the full topic](https://community.homey.app/t/trigger-alarm-if-garage-door-has-been-opened-for-more-than-x-minutes/38349)._
