# I have this advanced flow to random turn on or off my lights at home while i am away from home

**URL:** <https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737>\
**Category:** Questions & Help\
**Tags:** flow, homey-pro, advancedflow\
**Created:** [June 6, 2025, 4:30pm UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737 "2025-06-06T16:30:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claus\_Jacobsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/claus_jacobsen/32/81074_2.png) [@Claus\_Jacobsen](https://community.homey.app/u/Claus_Jacobsen)\
**Post date:** [June 6, 2025, 4:30pm UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/1 "2025-06-06T16:30:06Z")

</div>

But it seems to not be working. it will not turn on my lights between 16-18 hours..  
virtuel button always on and my alarm is activated, but at 16 o´clock the lights do not turn on.

 ![Skærmbillede 2025-06-06 181835](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/f/1f9133fd1f71b99cb6efebfe4fee51875b364fd3.png)

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [June 6, 2025, 4:40pm UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/2 "2025-06-06T16:40:33Z")

</div>

> First of all, welcome to the Homey Community!
> 
> To make sure you are aware of the forum rules, please read the _ **Welcome to the forum!** _ post [here](https://community.homey.app/t/welcome-to-the-forum/31).

---

<div class="post-metadata">

**Author:** ![Claus\_Jacobsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/claus_jacobsen/32/81074_2.png) [@Claus\_Jacobsen](https://community.homey.app/u/Claus_Jacobsen)\
**Post date:** [June 6, 2025, 4:52pm UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/3 "2025-06-06T16:52:00Z")

</div>

It is only working once. it will work once every time i toggle the virtuel button

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [June 6, 2025, 11:36pm UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/4 "2025-06-06T23:36:37Z")

</div>

This normal flow works for me:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/6/866765c2b067c057c4a7ca18dc8ccc73921c2048.jpeg)

---

<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 7, 2025, 12:08am UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/5 "2025-06-07T00:08:06Z")

</div>

You’ll need to use “When logic [alarm activated] is changed” as trigger

 ![Screenshot_20250607_021140_Firefox](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/0/f05bbcf8547f12abd538940ecb8606783ce05ebe.jpeg)  
instead of the trigger you use now (and what is it)?  
 ![Screenshot_20250607_020349_Google](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/9/9974c2efc17a7db330ba15b97785f31485d19363.jpeg)

---

<div class="post-metadata">

**Author:** ![Claus\_Jacobsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/claus_jacobsen/32/81074_2.png) [@Claus\_Jacobsen](https://community.homey.app/u/Claus_Jacobsen)\
**Post date:** [June 7, 2025, 9:21am UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/6 "2025-06-07T09:21:58Z")

</div>

Can you explain why, because if i look at the veribals, the only thing i am waiting for us the time to be between 16-18.  
And the alarm state has changed for 3 weeks ago. And it will not change again before i get home. Thanks in advance

---

<div class="post-metadata">

**Author:** ![Claus\_Jacobsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/claus_jacobsen/32/81074_2.png) [@Claus\_Jacobsen](https://community.homey.app/u/Claus_Jacobsen)\
**Post date:** [June 7, 2025, 9:50am UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/7 "2025-06-07T09:50:33Z")

</div>

Thanks i will try something like that

---

<div class="post-metadata">

**Author:** ![DaneedeKruyff](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daneedekruyff/32/964_2.png) [@DaneedeKruyff](https://community.homey.app/u/DaneedeKruyff)\
**Post date:** [June 7, 2025, 1:39pm UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/8 "2025-06-07T13:39:54Z")

</div>

A flow needs a trigger to start, it’s an action on _when_ something happens, not _if_.

---

<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 7, 2025, 2:29pm UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/9 "2025-06-07T14:29:41Z")

</div>

Yeah this only triggers when your alarm is enabled, not when it’s already enabled.

This is how I would build it:  
when  
alarm is enabled  
then  
start @ home simulation

when  
alarm is disabled  
then  
stop @ home simulation

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [June 10, 2025, 5:10pm UTC](https://community.homey.app/t/i-have-this-advanced-flow-to-random-turn-on-or-off-my-lights-at-home-while-i-am-away-from-home/137737/11 "2025-06-10T17:10:01Z")

</div>

What is the reason to make it turn on random?  
(It makes things heavily complicated, so high risk on bugs)
