# Start and stop dimming with one click

**URL:** <https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125>\
**Category:** Flows\
**Tags:** flow, homey-pro, advancedflow\
**Created:** [November 8, 2023, 10:48pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125 "2023-11-08T22:48:32Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mp9](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mp9/32/79653_2.png) [@Mp9](https://community.homey.app/u/Mp9)\
**Post date:** [November 8, 2023, 10:48pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/1 "2023-11-08T22:48:32Z")

</div>

Hi

Had my Homey Pro (early 2023) for two weeks now and want to share a refelctions and a flow for dimming lights

REFLECTION  
I started with some easy flow and automations but got stuck when it came to something as common as dimming a light. (why is this not a function by it self?) Inititaly I couln’t get it to work with Advanced flow so I added Homeyscript. If “normal” flows is to crawl and Advanced flows is to walk then scrips is not to run it’s more like flying an airplan so had to turn back to advanced flows.

FLOW FOR DIMMING LIGHT  
After some experimenting I finaly got it working by pressing button to start dimming and when I press it again it stops at present dim level. I also added a logic to always dim by steps of 5% regardles of where the dim level is when starting.

Some of it is in Swedish so I’ll take you through it.

On top of the first picture is a basic turn on turn off function setting the light at a fixed din and (light-) temparature level.

Then to the acctual dimmin process. There are two identical flows, one for dimming up and one for dimming down (well not exactely identical but you get it) it check if light is on and if there is a dimming loop already runing (this to be able to use the same button to stop the dimming loop) and for dimming up it checks if the dim level is less than 1 (=100%) and if all true it start a second flow for the actual dimming process. Same for dimming down but there I check if dim level is more than 0,01 (=1%).

Now to be able to do this I added two apps, “Better Logic Library” and “Loops”…

-= Before I continue I just need to give a BIG thanks to all antusiasts that makes these greate apps to andvance the funtionality and suport all other users! =-

… okay, so there is one flow for dimming up and one for dimming down, again that are the same but with oposit function so I’m just showing the one for dimming up.

It checks that light is on and then setts the logic for getting a 5% increase. [1 – present dimming level x 100 /5] will give the number of steps needed to get to 100%. (for diming down the calculation is just [present dimming level x100/5]) Then we have the steps for starting, running (iterates) and finishing the loop.

 ![bild](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/8/f82bc065f4dd4177dcbacad42209e0816cf87553.jpeg)

The last step is the function to stop the loop when you are at your disired dimming level. When you press the buttong again it check to see if the loop is runing and if so stops it.

 ![bild](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/e/6e6cdc640127a33365d57755fd7845e6485c3304.jpeg)

PS. There might be better and smarter ways to do this but I’m just a newbie

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [November 9, 2023, 10:07am UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/2 "2023-11-09T10:07:14Z")

</div>

Thank you for sharing your flows!

---

<div class="post-metadata">

**Author:** ![Tobias\_Franzen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tobias_franzen/32/84215_2.png) [@Tobias\_Franzen](https://community.homey.app/u/Tobias_Franzen)\
**Post date:** [November 21, 2023, 6:59am UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/3 "2023-11-21T06:59:52Z")

</div>

This sound interesting, I have an ikea styrbar that I was planning to use as a dimmer for my ceiling lights that are connected to a qubino dimmer. But I never thought it would be so difficult to make it work. Perhaps I can send you a PM when I have the time to program this. (I’m also from Sweden )

---

<div class="post-metadata">

**Author:** ![JamesPigeon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamespigeon/32/84899_2.png) [@JamesPigeon](https://community.homey.app/u/JamesPigeon)\
**Post date:** [December 30, 2023, 9:33am UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/4 "2023-12-30T09:33:37Z")

</div>

Did you make it work?

---

<div class="post-metadata">

**Author:** ![Mp9](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mp9/32/79653_2.png) [@Mp9](https://community.homey.app/u/Mp9)\
**Post date:** [January 1, 2024, 8:29pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/5 "2024-01-01T20:29:04Z")

</div>

Hi  
Yes it works just fine.  
Please let me know if you want some more details.

Hope 2024 gets us many more functions and updates

---

<div class="post-metadata">

**Author:** ![Nikolas\_Kristiansen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nikolas_kristiansen/32/84550_2.png) [@Nikolas\_Kristiansen](https://community.homey.app/u/Nikolas_Kristiansen)\
**Post date:** [June 2, 2024, 2:55pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/6 "2024-06-02T14:55:06Z")

</div>

Hi, if it were posible for you, Could you share some more details, i am trying to recreate it on my Lights at home, but failing. idk what i am doign wrong.

---

<div class="post-metadata">

**Author:** ![David\_Be](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/david_be/32/120935_2.png) [@David\_Be](https://community.homey.app/u/David_Be)\
**Post date:** [October 6, 2025, 8:39pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/9 "2025-10-06T20:39:20Z")

</div>

Hello and sorry for spamming you with my replys.

But would it be possible for you to share these flows with us? So we can copy them?

Thanks.

(Tack på förhand. =) )

David

---

<div class="post-metadata">

**Author:** ![Mp9](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mp9/32/79653_2.png) [@Mp9](https://community.homey.app/u/Mp9)\
**Post date:** [October 10, 2025, 10:01pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/10 "2025-10-10T22:01:45Z")

</div>

![on - off and Dim start](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/1/81dd7dcbc5eb4e0146035feb3f8b9fca8cb5afe2.png)

 ![Dim Up](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/8/381be015a515f5c5904438eea06740812769f882.png)

 ![Dim Down](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/4/b44d1bde65b8089123be39d24244279c37a79925.png)

here is the complete flows for my turning on and off light and the long press to initiate the Dim flows.

hope this helps you

/Michael

---

<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:** [October 11, 2025, 10:20am UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/11 "2025-10-11T10:20:01Z")

</div>

When I saw your flow and counted 50 flowcards I was challenged if I could reduce the number of cards and have simular functions using the Chronograph-app

> [@Mp9](#):
>
> here is the complete flows for my turning on and off light and the long press to initiate the Dim flows.

One click turns the light on/off or stops dimming

A long press initiates dimming in the opposite direction from last time

 ![Scherm­afbeelding 2025-10-11 om 12.05.06](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/e/9eca25697a471444eb8bf3007ddc2d53552d62f3.jpeg)

---

<div class="post-metadata">

**Author:** ![Mp9](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mp9/32/79653_2.png) [@Mp9](https://community.homey.app/u/Mp9)\
**Post date:** [October 12, 2025, 10:05am UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/12 "2025-10-12T10:05:34Z")

</div>

Thank you for this I will for sure test it  
I made mine as one of the first flows and I’m happy that this have generated other solutions 🙂

---

<div class="post-metadata">

**Author:** ![Ruemenapp](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ruemenapp/32/120937_2.png) [@Ruemenapp](https://community.homey.app/u/Ruemenapp)\
**Post date:** [January 15, 2026, 6:01pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/13 "2026-01-15T18:01:33Z")

</div>

Great, i just am not experienced enough, could you please help me to get this up running. The thing i do not understand is the variables used in the Logic cards. - help 🙂

---

<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:** [January 15, 2026, 6:40pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/14 "2026-01-15T18:40:32Z")

</div>

You’re right. That part needs a little bit more clarification.

If the dimlevel is 0% and I want to dim to 100% the transition is going from 0 to 1 in 40 steps in 20 seconds. So the transition value becomes 0.025 higher at each step. And there is half a second between 2 steps.  
But when the dimlevel is 35% I need less time and less steps to reach 100%  
I need 65% (100%-35%) of the time and 65% of the number of steps.  
So dimming up: runtime: (1-dimlevel) × 20 seconds and steps: (1-dimlevel) × 40steps  
Dimming down: runtime: dimlevel × 20 seconds and steps: dimlevel × 40 steps.

---

<div class="post-metadata">

**Author:** ![TThrane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tthrane/32/154923_2.png) [@TThrane](https://community.homey.app/u/TThrane)\
**Post date:** [February 27, 2026, 12:35pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/15 "2026-02-27T12:35:55Z")

</div>

Looks great!  
Please share the variables you use/have set …

---

<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:** [February 27, 2026, 12:49pm UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/16 "2026-02-27T12:49:13Z")

</div>

> [@Start and stop dimming with one click](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/11):
>
> When I saw your flow and counted 50 flowcards I was challenged if I could reduce the number of cards and have simular functions using the Chronograph-app One click turns the light on/off or stops dimming A long press initiates dimming in the opposite direction from last time

---

<div class="post-metadata">

**Author:** ![TThrane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tthrane/32/154923_2.png) [@TThrane](https://community.homey.app/u/TThrane)\
**Post date:** [March 5, 2026, 6:34am UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/17 "2026-03-05T06:34:55Z")

</div>

Thanks, but I only see the names of the variables, not their starting value?

---

<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:** [March 5, 2026, 9:31am UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/18 "2026-03-05T09:31:42Z")

</div>

Let’s say the current dimlevel is 0%. A long press will start a transition from 0 to 1 in 40 steps during 20 \*)seconds.  
So the transition value becomes 0.025 (= 2,5%) higher at each step. And there is half a second between 2 steps.

But when the dimlevel is 35% I need less time and less steps to reach 100%  
I need 65% (100%-35%) of the time (= 13 seconds )and 65% of the number of steps (= 26 steps) to dim the light a the same pace.

So dimming up in general:  
runtime (in dutch looptijd): (1-dimlevel) × 20 seconds  
and steps (in dutch stappen): (1-dimlevel) × 40steps.

Dimming down:  
runtime: dimlevel × 20 seconds  
and steps: dimlevel × 40 steps.

Both runtime and step are recalculated depending the dimlevel and dimdirection after a longpress.

\*) 20 seconds is maybe to slow.

---

<div class="post-metadata">

**Author:** ![TThrane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tthrane/32/154923_2.png) [@TThrane](https://community.homey.app/u/TThrane)\
**Post date:** [March 12, 2026, 6:19am UTC](https://community.homey.app/t/start-and-stop-dimming-with-one-click/94125/19 "2026-03-12T06:19:21Z")

</div>

Thanks, will give it a try! 🙏🏻
