# Trigger delay, or countdown timer?

**URL:** <https://community.homey.app/t/trigger-delay-or-countdown-timer/76633>\
**Category:** Questions & Help\
**Created:** [February 18, 2023, 9:31pm UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633 "2023-02-18T21:31:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravve](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ravve/32/23691_2.png) [@ravve](https://community.homey.app/u/ravve)\
**Post date:** [February 18, 2023, 9:31pm UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/1 "2023-02-18T21:31:27Z")

</div>

What is the best option to have the lights turn on at 18:00, and off at 22:00?  
The fewer flows the better, but I am concerned that using a delay (option 1 below) could affect the hardware and possibly shorten the lifetime of my Homey?

Options:  
1- Single flow, turn lights on at 18:00 and another trigger with a delay set to 240 min to turn them off.  
2- Using the app Countdown (will need several flows)  
3- one flow for turning lights on at 18:00, another flow to turn them off at 22:00

My question is basically if option 1 will increase the wear of my Homey, compared to option 3?

---

<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:** [February 18, 2023, 9:49pm UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/2 "2023-02-18T21:49:49Z")

</div>

Timer - one flow.

> **[Timer](https://homey.app/en-us/app/com.synplyworks.thenmore/Timer/)**
>
> Timer adds Timer functionality in the Then clause of your flows

> [@ravve](#):
>
> if option 1 will increase the wear of my Homey

It will not, it doesn’t have any effect on MTBF.

---

<div class="post-metadata">

**Author:** ![ravve](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ravve/32/23691_2.png) [@ravve](https://community.homey.app/u/ravve)\
**Post date:** [February 18, 2023, 10:00pm UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/3 "2023-02-18T22:00:37Z")

</div>

Thanks mate!  
Just a question, why to use the Timer app if I simply can use the standard delay (option 1)?

---

<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:** [February 19, 2023, 12:17am UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/4 "2023-02-19T00:17:19Z")

</div>

My advice is option 3, no extra timer app needed, easy to maintaine, don’t whory about wear out your Homey, it can do more things over a longer time than you can think of.

---

<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:** [February 19, 2023, 7:41am UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/5 "2023-02-19T07:41:36Z")

</div>

By a Homey restart, for which reason ever, the build-in delay will stop.  
I know, that a Chronograph App timer will continue after a restart of Homey, but my first choice is also no. 3.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [February 19, 2023, 8:10am UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/6 "2023-02-19T08:10:56Z")

</div>

Option 3 every time.

---

<div class="post-metadata">

**Author:** ![RogerSt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rogerst/32/12432_2.png) [@RogerSt](https://community.homey.app/u/RogerSt)\
**Post date:** [February 19, 2023, 10:29am UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/7 "2023-02-19T10:29:36Z")

</div>

For short periods of on/off I might consider the Timer app. I have this in place for motion/alert-based flows.

For scheduled on/off, I would use separate, time-triggered flows. You can do this on a single advanced flow. Another advantage is that you could use sun-events to have timing which automatically adapts to sunset times etc. Sun Events app: [Sun Events App for Homey | Homey](https://homey.app/en-us/app/com.cyclone-software.sunevents/Sun-Events/)

Also, to distract any potential burglars you can also add random start/end times using separate flows and sunevents. So it will turn on e.g. 10-25 minutes before sunset, and e.g. between -5 and +10 offset from 23:00hrs.

Have fun!

---

<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:** [February 19, 2023, 3:47pm UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/8 "2023-02-19T15:47:38Z")

</div>

Indeed, why use a timer for this?

If the times are both fixed, just use option 3 i would say.

---

<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:** [February 19, 2023, 5:30pm UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/9 "2023-02-19T17:30:10Z")

</div>

> [@ravve](#):
>
> if I simply can use the standard delay (option 1)?

It was just provided as example, given all the options you are considering but the option 3 for such long delays I would use as well. Timer is suitable eg. for 30sec / 2 min durations etc. - you will just use one trigger like that - it will Turn on and Turn off lights after given period, using it for controlling all lights in my house:  
 ![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/2/32bca8b6e03ed77b31d6200e5573236082f59b91.png)

---

<div class="post-metadata">

**Author:** ![mrPilloft](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mrpilloft/32/87781_2.png) [@mrPilloft](https://community.homey.app/u/mrPilloft)\
**Post date:** [October 12, 2023, 10:01am UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/10 "2023-10-12T10:01:24Z")

</div>

> [@RogerSt](#):
>
> add random start/end times

RANDOM! How can I get a random number between x and y? Are there any functionality for this available?

---

<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:** [October 12, 2023, 10:22am UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/11 "2023-10-12T10:22:45Z")

</div>

There are different possibilities.

Chronograph App:  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/0/a05b6dda6f1aac1cb78c2c4e4f0795e94a2f2b30.png)

Build-In delays:  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/4/a41ed7dbb95f73bc10137e0347b1bc27c1f76e87.png)

Temporary Variables App:  
 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/5/65d9709e0ef8d57938e20deef3138b3cfd626ab3.png)  
(also possible with the build in logic cards)

Didn’t tested my self yet, but I guess it’s also possible to calculate a random number with a seperate flow, store this number into a number variable und use this variable with the sunset/sunrise trigger card of the Sun Events App:

![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/1/c1674b8b8dff8f38c49e3aa180a3315b7f58a379.png)

---

<div class="post-metadata">

**Author:** ![RogerSt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rogerst/32/12432_2.png) [@RogerSt](https://community.homey.app/u/RogerSt)\
**Post date:** [October 12, 2023, 12:34pm UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/12 "2023-10-12T12:34:01Z")

</div>

Example of scenario #3:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/8/f806f3e2a14ef866a4f5bd692a992f471cc40650.png)

Turning lights **OFF** at random times after a preset-time; any burglar will be puzzled that lights never turn off at exactly the same time and with never the same intervals.

---

<div class="post-metadata">

**Author:** ![RogerSt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rogerst/32/12432_2.png) [@RogerSt](https://community.homey.app/u/RogerSt)\
**Post date:** [October 12, 2023, 12:37pm UTC](https://community.homey.app/t/trigger-delay-or-countdown-timer/76633/13 "2023-10-12T12:37:19Z")

</div>

Similar flow to turn my lights **ON** when it is getting dark (times change throughout the seasons):  
(uses the SunEvents app to make sure it knows when it is getting dark without the use of lux sensors)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/f/9ff5e2384ebb6dbd66bcef24351c9268afb34c5d.png)
