# Using variable for setting the dim level on a light bulb. Why is this flow not working

**URL:** <https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925>\
**Category:** Questions & Help\
**Created:** [August 2, 2025, 7:59am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925 "2025-08-02T07:59:12Z")\
**Posts on this page:** 9\
**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:** [August 2, 2025, 7:59am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925/1 "2025-08-02T07:59:12Z")

</div>

![1000006523](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/6/362ec0001b75dc4b7e0db68c14c76a38d0d58ac2.jpeg)

---

<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:** [August 2, 2025, 8:28am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925/2 "2025-08-02T08:28:02Z")

</div>

Perhaps because you are using the wrong number format in the variable.  
To set a brightness, you must set a numerical value between 0 and 1.

0 = 0 %  
0.2 = 20 %  
0.55 = 55 %  
1 = 100 %

---

<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:** [August 2, 2025, 8:28am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925/3 "2025-08-02T08:28:57Z")

</div>

‘Er slukket’ means the light is off?

May be the light is on, but dimmed to 0%. In that case the condition is not true.

This can easily be tested if you click the ‘play’button.

---

<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:** [August 2, 2025, 9:14am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925/4 "2025-08-02T09:14:59Z")

</div>

Okay thanks. It is just if i put a number of. 50 instead of the var, then i works. But i will try it. Thanks

---

<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:** [August 2, 2025, 9:15am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925/5 "2025-08-02T09:15:35Z")

</div>

When i put in a number instead of the var it works. Thanks

---

<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:** [August 2, 2025, 9:30am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925/6 "2025-08-02T09:30:11Z")

</div>

Maybe the dimmer only accepts a limited number of decimals. And the var has more??

0.50 vs 0.5011

My radio had that same issue. So I now round the var to 2 decimals before using it.

(Ignore the +0.05, that is the level I want to increase when the button is pressed)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/5/85ef25964ed6e11c80176d4b655be84a9959e905.png)

---

<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:** [August 2, 2025, 9:44am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925/7 "2025-08-02T09:44:17Z")

</div>

Maybe you can tell/show us what is written in the variable!?

---

<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:** [August 2, 2025, 9:45am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925/8 "2025-08-02T09:45:01Z")

</div>

Thanks it works with one decimal ex 0.4

---

<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:** [August 2, 2025, 9:49am UTC](https://community.homey.app/t/using-variable-for-setting-the-dim-level-on-a-light-bulb-why-is-this-flow-not-working/140925/9 "2025-08-02T09:49:19Z")

</div>

It will also work with 2 decimal digits, but not with 3, 4 or more.
