# Homey Flow causing infinite loop

**URL:** <https://community.homey.app/t/homey-flow-causing-infinite-loop/125772>\
**Category:** Questions & Help\
**Tags:** advancedflow\
**Created:** [December 29, 2024, 9:45am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772 "2024-12-29T09:45:10Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 29, 2024, 9:45am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/1 "2024-12-29T09:45:10Z")

</div>

I have added a LED switch which should turn on multiple lights when pressed. When pressed again it turns all the lights off. However, randomly (about once a week), the lights enter some kind of loop when I turn them on, where all the lights turn on and off continously and the only way to break the loop is for me to reboot the Homey. Anyone know what the problem might be?  
I have made an advanced flow, where “when switch is activated, turn on all the lights”, and the same way on switch deactivation. I don`t think the problem is the LED switch itself, because it never happens when I use the switch standalone without using it through a flow.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [December 29, 2024, 9:51am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/2 "2024-12-29T09:51:08Z")

</div>

Show The Flow™

---

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 29, 2024, 10:01am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/3 "2024-12-29T10:01:42Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/3/7370529784a67054557f1a67d6d30028e6fafe03.png)

(I have also tried to separate activate/deactivate in each separate flow but it didn`t help at all.)

---

<div class="post-metadata">

**Author:** ![ricercar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ricercar/32/101928_2.png) [@ricercar](https://community.homey.app/u/ricercar)\
**Post date:** [December 29, 2024, 10:05am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/4 "2024-12-29T10:05:36Z")

</div>

I have had the same kind of problem with a flow that randomly looped. I added a delay (5s) before the on/off actions and it solved it

---

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 29, 2024, 10:40am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/5 "2024-12-29T10:40:05Z")

</div>

thank you. I`ll try to do the same and see if that helps.

---

<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:** [December 29, 2024, 12:40pm UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/6 "2024-12-29T12:40:58Z")

</div>

> [@pinpoint](#):
>
> and the only way to break the loop is for me to reboot the Homey.

I have a flow that should loop, but luckily doesn’t. So I can use it as a ‘hotelswitch’.

 ![Scherm­afbeelding 2024-12-29 om 13.31.11](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/b/ab17f97068c3fdf28ec3e62cc482b0acea25866d.png)

When I push the button twice fast it loops.

When this happens I disable the flow and then able it again.

I doesn’t happens often, but often enough to create a flow for it:

 ![Scherm­afbeelding 2024-12-29 om 13.52.59](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/f/cfaf1c39b640fdf9339d5b0bd5eba19f638469b4.png)

---

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 29, 2024, 3:53pm UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/7 "2024-12-29T15:53:17Z")

</div>

Unfortunately, adding delay did not solve the problem. It still turns repetedly on/off, though now with longer delays.

---

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 29, 2024, 3:54pm UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/8 "2024-12-29T15:54:47Z")

</div>

I can trigger the loop by pressing quickly 2 or more times on the switch  
The switch has only option to activate or deactivate, or perform a specific action when changing dimming. It has no option to perform a specific action when double pressed.

---

<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:** [December 29, 2024, 4:08pm UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/9 "2024-12-29T16:08:01Z")

</div>

My point was that I don’t reboot the homey. Just disable and able this looping flow. Which I can do I with another flow and another button.

---

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 29, 2024, 4:16pm UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/10 "2024-12-29T16:16:56Z")

</div>

I`ll try to do the same. thanks

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [December 29, 2024, 5:02pm UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/11 "2024-12-29T17:02:46Z")

</div>

What is the brand and type of switch? Is there a dedicated Homey app for your switch? If so, you also might want to mention your issue in the dedicated topic of that Homey app.

Just a though: it sounds like either your switch or the linked Homey app is interpreting you switch action twice (first press for on and second press for off). I had a similar issue with a Tuya based Zigbee scene switch. I had to catch the duplicate action in a flow for it to only execute once. In my case the issue was a bug in the Tuya Zigbee Homey app for my switch model.

---

<div class="post-metadata">

**Author:** ![ricercar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ricercar/32/101928_2.png) [@ricercar](https://community.homey.app/u/ricercar)\
**Post date:** [December 29, 2024, 5:23pm UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/12 "2024-12-29T17:23:20Z")

</div>

Have you tried to switch them on/off in serial rather than in parallel ?

---

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 29, 2024, 6:11pm UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/13 "2024-12-29T18:11:37Z")

</div>

No, how exactly can i do that?

---

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 29, 2024, 6:14pm UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/14 "2024-12-29T18:14:04Z")

</div>

yes. It is a dedicated app for my switch (namron). I have contacted them, but so far not received any solution to the problem, neither what may be the cause of the problem.

I have made the flow work in that way that button press always deactivates the flow and reactivates it again after a few secs. Currently looks like this has solved the issue.

---

<div class="post-metadata">

**Author:** ![s73nm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/s73nm/32/110438_2.png) [@s73nm](https://community.homey.app/u/s73nm)\
**Post date:** [December 30, 2024, 6:59am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/15 "2024-12-30T06:59:24Z")

</div>

By turning the switch on/off, you are controlling other devices, turning them on/off.  
Do you have any flows that are triggered when these devices are turned on/off?  
Perhaps the loop is spread across multiple flows. E.g Flow 1 trigger Flow 2 and Flow 2 triggers Flow 1.

---

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 30, 2024, 9:55am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/16 "2024-12-30T09:55:17Z")

</div>

no, no flows are triggered when these devices are turned on/off. I have other flows that also turn on/off the same devices, but none of these are triggering devices

---

<div class="post-metadata">

**Author:** ![RoyWissenburg](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@RoyWissenburg](https://community.homey.app/u/RoyWissenburg)\
**Post date:** [December 30, 2024, 10:20am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/17 "2024-12-30T10:20:40Z")

</div>

what brand/type is the switch? and wich app controlls it?

---

<div class="post-metadata">

**Author:** ![pinpoint](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pinpoint/32/79444_2.png) [@pinpoint](https://community.homey.app/u/pinpoint)\
**Post date:** [December 30, 2024, 10:39am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/18 "2024-12-30T10:39:05Z")

</div>

Namron is the brand/app. The device is 4512751 Namron Zigbee LED Dimmer which is used as a switch. It controls multiple other namrom devices through homey, both zigbee LED dimmers and zigbee switches.

---

<div class="post-metadata">

**Author:** ![RoyWissenburg](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@RoyWissenburg](https://community.homey.app/u/RoyWissenburg)\
**Post date:** [December 30, 2024, 11:06am UTC](https://community.homey.app/t/homey-flow-causing-infinite-loop/125772/19 "2024-12-30T11:06:44Z")

</div>

For sure i would use a card in the “and part” of the flow “is on” “is off”

So switch on and is off then do…

Also for the switch off flow and " is on"
