# Using Variables in Delay

**URL:** <https://community.homey.app/t/using-variables-in-delay/153250>\
**Category:** Questions & Help\
**Tags:** flow, homey-pro, advancedflow\
**Created:** [April 1, 2026, 7:25pm UTC](https://community.homey.app/t/using-variables-in-delay/153250 "2026-04-01T19:25:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drako74](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/drako74/32/150506_2.png) [@Drako74](https://community.homey.app/u/Drako74)\
**Post date:** [April 1, 2026, 7:25pm UTC](https://community.homey.app/t/using-variables-in-delay/153250/1 "2026-04-01T19:25:16Z")

</div>

Is there a way to use number Variables for the time in the Delay card? And if not, why not?

For example: To turn lights on/off at random lengths of time after sunset.

In fact, why is there not a random number generator/option not available in the standard cards?  
(I think if I install many more apps my Homey Pro might implode ha ha)

---

<div class="post-metadata">

**Author:** ![Wim\_Post](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wim_post/32/56793_2.png) [@Wim\_Post](https://community.homey.app/u/Wim_Post)\
**Post date:** [April 1, 2026, 7:40pm UTC](https://community.homey.app/t/using-variables-in-delay/153250/2 "2026-04-01T19:40:04Z")

</div>

![IMG_2142](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/2/c20b1e0b3da8caf7d6ce9c8d97fbd8758470f3bf.jpeg)

> [@Drako74](#):
>
> turn lights on/off at random lengths of time after sunset.

When the sun sets turn on light after 0 to 60 minutes

---

<div class="post-metadata">

**Author:** ![Drako74](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/drako74/32/150506_2.png) [@Drako74](https://community.homey.app/u/Drako74)\
**Post date:** [April 1, 2026, 11:16pm UTC](https://community.homey.app/t/using-variables-in-delay/153250/3 "2026-04-01T23:16:27Z")

</div>

Sorry, I don’t understand what that says. But thank you for the reply.

---

<div class="post-metadata">

**Author:** ![Anoniemand](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anoniemand/32/120697_2.png) [@Anoniemand](https://community.homey.app/u/Anoniemand)\
**Post date:** [April 2, 2026, 4:35am UTC](https://community.homey.app/t/using-variables-in-delay/153250/4 "2026-04-02T04:35:35Z")

</div>

In a delay card you can put two values separated with a dash. So you can set a minimum and a maximum value for the delay. It than will, at time of execution, generate a random delay between those two values.

If you want a value between 10 and 30 minutes you can fill in `10-30`.

As Wim is showing, you can also use that same principle in a standard flow. Use google lens for translation, or create a simple flow insert a THEN card, grab a light ‘Turn on’ card and see for yourself. The text in smaller size gives the same explanation.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/a/4a9999b94f3934bb23eca7f4074316283568d2bc.png)

---

<div class="post-metadata">

**Author:** ![Drako74](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/drako74/32/150506_2.png) [@Drako74](https://community.homey.app/u/Drako74)\
**Post date:** [April 2, 2026, 4:53pm UTC](https://community.homey.app/t/using-variables-in-delay/153250/5 "2026-04-02T16:53:14Z")

</div>

Thank you, that makes sense. And my apologies, but I’ve only owned my Homey Pro a few weeks, still many more advanced flows to create, and many more devices to add 🙂 I’m learning as I go ha ha
