# Advanced Flow Working in Test State But Failing Once Saved

**URL:** <https://community.homey.app/t/advanced-flow-working-in-test-state-but-failing-once-saved/111164>\
**Category:** Questions & Help\
**Tags:** flow, homey-pro, advancedflow\
**Created:** [June 7, 2024, 7:13pm UTC](https://community.homey.app/t/advanced-flow-working-in-test-state-but-failing-once-saved/111164 "2024-06-07T19:13:03Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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, 2024, 8:25pm UTC](https://community.homey.app/t/advanced-flow-working-in-test-state-but-failing-once-saved/111164/10 "2024-06-07T20:25:46Z")

</div>

> [@Ruckus](#):
>
> So when turned off → dim to % → then turn off

That’s not what I meant, and _ **it causes a loop** _  
When turned off → dim to % (this causes most lights to turn on with dimlevel %) → Then turn off  
Now the flow starts again immediately, because:  
When turned off → dim to % (this causes most lights to turn on with dimlevel %) → Then turn off  
Now the flow starts again immediately, because:  
When turned off → dim to % (this causes most lights to turn on with dimlevel %) → Then turn off  
Now the flow starts again immediately, because …

And so on and on.

I even showed it in the other topic, you added the trigger somehow 🤷‍♂️😉

> [@\[APP\] Zooz - Let's build smarter tech together](https://community.homey.app/t/app-zooz-lets-build-smarter-tech-together/130214/36):
>
> you should always turn it off like this:  
> Then…  
> -dim light X to 1%  
> -turn light X off after 1s

I did not say to trigger the flow with ‘When light X is turned off’

I meant, or tried to explain, in all the flows where you use the action card “Then turn light X off” you should use  
Then…  
-dim light X to 1%  
-turn light X off after 1s  
instead.

Now the light should have dimlevel 1% when you turn it on from anywhere.

I hope it’s a bit clearer now

---

_[View the full topic](https://community.homey.app/t/advanced-flow-working-in-test-state-but-failing-once-saved/111164)._
