# Trigger must be triggered x times within y minutes

**URL:** https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703
**Category:** Flows
**Tags:** advancedflow
**Created:** [June 5, 2023, 6:18am UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703 "2023-06-05T06:18:14Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Homey\_User\_T](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/homey_user_t/32/65605_2.png) [@Homey\_User\_T](https://community.homey.app/u/Homey_User_T)
#### Post date: [June 5, 2023, 6:18am UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/1 "2023-06-05T06:18:14Z")

</div>

Looking for an easy solution for an advanced flow to trigger a flow or continue a flow only when a trigger (eg a light sensor) has been triggered x times within a certain timeframe?

Any ideas besides creating a flow with a countdown for each device?

---

<div class="post-metadata">

### Author: ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)
#### Post date: [June 5, 2023, 11:18am UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/2 "2023-06-05T11:18:47Z")

</div>

Made me think, why… Are you trying to workaround a sensor with too many false positives?

I can’t think of something else as ‘fix’.

---

<div class="post-metadata">

### Author: ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)
#### Post date: [June 5, 2023, 12:21pm UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/3 "2023-06-05T12:21:58Z")

</div>

Isn’t DC suitable workaround for this ?

![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/f/ef57b6c3699dbf824147af2861c43333b32315bc.png)

---

<div class="post-metadata">

### Author: ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)
#### Post date: [June 5, 2023, 1:26pm UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/4 "2023-06-05T13:26:55Z")

</div>

I think so, yeah. Forgot about this feature of the great ‘swiss army knife’ app 😛

---

<div class="post-metadata">

### Author: ![Homey\_User\_T](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/homey_user_t/32/65605_2.png) [@Homey\_User\_T](https://community.homey.app/u/Homey_User_T)
#### Post date: [June 13, 2023, 2:38pm UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/5 "2023-06-13T14:38:10Z")

</div>

Not really, because I can only do “for 2 minutes”, but not “alarm\_motion equal 1 - 2 times within 1 minute”. And when I query boolean values, I can only do “Is Equal” to a text value. Or I have overlooked something.

---

<div class="post-metadata">

### Author: ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)
#### Post date: [June 14, 2023, 12:04am UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/6 "2023-06-14T00:04:37Z")

</div>

Ah I see.  
You’re right, it is not suitable to count x events from a boolean value

This is a way to accomplish it; You’ll need a counter and a timer;  
In this xmpl, the motion alarm should have triggered 5 times within 5 minutes, and then the flow continues:

 ![Screenshot from 2023-06-14 02-18-41](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/a/aadd4f8e99045f8be28a083c7daf6ed5fccf13d6.png)

---

<div class="post-metadata">

### Author: ![Homey\_User\_T](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/homey_user_t/32/65605_2.png) [@Homey\_User\_T](https://community.homey.app/u/Homey_User_T)
#### Post date: [July 7, 2023, 7:08am UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/7 "2023-07-07T07:08:10Z")

</div>

Yep, thanks for your effort … that was also my insight, but I thought there’s some more elegant/short way or an app to do it.

---

<div class="post-metadata">

### Author: ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)
#### Post date: [July 7, 2023, 1:59pm UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/8 "2023-07-07T13:59:32Z")

</div>

YW. I think this usecase is not used very often (or I’m totally wrong here). Most of the time the first trigger is what counts, isn’t it 😜

---

<div class="post-metadata">

### Author: ![Rikard\_Lundgren](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rikard_lundgren/32/49501_2.png) [@Rikard\_Lundgren](https://community.homey.app/u/Rikard_Lundgren)
#### Post date: [December 8, 2023, 1:14pm UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/9 "2023-12-08T13:14:44Z")

</div>

Does anyone know if the DC timer resumes if Homey e.g. would restart within the given period?

---

<div class="post-metadata">

### Author: ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)
#### Post date: [December 8, 2023, 1:40pm UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/10 "2023-12-08T13:40:27Z")

</div>

The dev could tell.  
I haven’t tested it yet.

@Arie_J_Godschalk does the timer of the card below, survive a Homey reboot?  
Like, when you use ‘for 30 minutes’, and Homey reboots 5 minutes later?  
 ![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/f/ef57b6c3699dbf824147af2861c43333b32315bc.png)

---

<div class="post-metadata">

### Author: ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)
#### Post date: [December 8, 2023, 1:59pm UTC](https://community.homey.app/t/trigger-must-be-triggered-x-times-within-y-minutes/81703/11 "2023-12-08T13:59:22Z")

</div>

> [@Peter\_Kawa](#):
>
> does the timer of the card below, survive a Homey reboot?

Yes!
