# Random automation

**URL:** <https://community.homey.app/t/random-automation/12484>\
**Category:** Ideas & Suggestions\
**Created:** [April 30, 2019, 2:08pm UTC](https://community.homey.app/t/random-automation/12484 "2019-04-30T14:08:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Latin105fm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/latin105fm/32/12583_2.png) [@Latin105fm](https://community.homey.app/u/Latin105fm)\
**Post date:** [April 30, 2019, 2:08pm UTC](https://community.homey.app/t/random-automation/12484/1 "2019-04-30T14:08:54Z")

</div>

Hi there. Is there a way to automate that some flows are random? Like in the PHILIPS Hue App where a light automation can turn on or off randomly with in a parameter set. Can you do that?

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [April 30, 2019, 2:24pm UTC](https://community.homey.app/t/random-automation/12484/2 "2019-04-30T14:24:31Z")

</div>

Check the description in your app of every device in the THEN column, at the “duration” and “delay” inputs.

---

<div class="post-metadata">

**Author:** ![Latin105fm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/latin105fm/32/12583_2.png) [@Latin105fm](https://community.homey.app/u/Latin105fm)\
**Post date:** [April 30, 2019, 5:41pm UTC](https://community.homey.app/t/random-automation/12484/3 "2019-04-30T17:41:06Z")

</div>

Thanks Caseda. Sorry for possibly my silly questions but I’ve ordered my Homey and waiting for it to arrive so never played with it before.

Would your reply mean that you can set the on/off to random?

Thanks again

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [April 30, 2019, 6:00pm UTC](https://community.homey.app/t/random-automation/12484/4 "2019-04-30T18:00:13Z")

</div>

Yes, any command that you can place in the then column (dim, on/off, anything) can have an delay with a range, like 1-300 seconds, it then activates that card somewhere between 1 and 300 seconds

---

<div class="post-metadata">

**Author:** ![willem](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willem/32/899_2.png) [@willem](https://community.homey.app/u/willem)\
**Post date:** [April 30, 2019, 7:36pm UTC](https://community.homey.app/t/random-automation/12484/5 "2019-04-30T19:36:11Z")

</div>

Are you trying to automate random lights going on or off to simulate presence in your home , of what would be the purpose of a random flow?

---

<div class="post-metadata">

**Author:** ![dima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dima/32/16639_2.png) [@dima](https://community.homey.app/u/dima)\
**Post date:** [December 5, 2022, 12:38pm UTC](https://community.homey.app/t/random-automation/12484/6 "2022-12-05T12:38:00Z")

</div>

You should be able to randomize parameters with Math: [math.js | an extensive math library for JavaScript and Node.js](https://mathjs.org/docs/reference/functions.html)

example: {{ randomInt([min, max]) }}

I have not tested this though.
