# Dim values of lights in off state

**URL:** <https://community.homey.app/t/dim-values-of-lights-in-off-state/69196>\
**Category:** Questions & Help\
**Created:** [September 20, 2022, 9:37pm UTC](https://community.homey.app/t/dim-values-of-lights-in-off-state/69196 "2022-09-20T21:37:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArnarS](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arnars/32/33981_2.png) [@ArnarS](https://community.homey.app/u/ArnarS)\
**Post date:** [September 20, 2022, 9:37pm UTC](https://community.homey.app/t/dim-values-of-lights-in-off-state/69196/1 "2022-09-20T21:37:54Z")

</div>

Hi.

When I turn a light off through homey and then turn it on again, it remembers its old dim value.  
But when I look at the light in homeyscript when it is OFF, its dim value is 0. Where is the old dim value stored? (and how to get to it in homeyscript?)

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [September 20, 2022, 10:04pm UTC](https://community.homey.app/t/dim-values-of-lights-in-off-state/69196/2 "2022-09-20T22:04:27Z")

</div>

Guessing you are talking about either Z-Wave or ZigBee, that’s how they work.  
Z-Wave: they have 0-99 for dim level (0 = off), and a seperate value to (255) to turn on the device in the old dim level, they don’t really have an “On/Off” capability.  
ZigBee I’m not 100% sure how they work, but the way of working is the same.

So in short, it is saved in the device itself, and you can’t retrieve the value.

---

<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:** [September 21, 2022, 3:18am UTC](https://community.homey.app/t/dim-values-of-lights-in-off-state/69196/3 "2022-09-21T03:18:11Z")

</div>

For the gear I use:  
Ikea (zigbee) (_Lamp Bank R_) goes to 0% when turned Off  
KaKu (CoCo) and Tuya wifi keep their dim level when turned Off  
 ![Screenshot from 2022-09-21 05-14-26](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/c/8c4c7fc43be61a39718a6509553b7cc6a66681e4.png)  
 ![Screenshot from 2022-09-21 05-15-28](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/0/50e9553e1a33d26b0a8138033b62015a7a32bb5a.png)

In Homeyscript, to retrieve the dim level for a device of which the dim level is 0% when off, the only way I think, is to first turn the light On, and then get its current dim level with a little delay.

---

<div class="post-metadata">

**Author:** ![ArnarS](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arnars/32/33981_2.png) [@ArnarS](https://community.homey.app/u/ArnarS)\
**Post date:** [October 8, 2022, 9:18am UTC](https://community.homey.app/t/dim-values-of-lights-in-off-state/69196/4 "2022-10-08T09:18:16Z")

</div>

For lights where I want to be able to do this, I ended up doing this:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/1/b1c9ccdd3ade752ee5b4485f5b565f5b4de730dc.png)

I can then access these variables if the lights is off

---

<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:** [October 8, 2022, 9:51am UTC](https://community.homey.app/t/dim-values-of-lights-in-off-state/69196/5 "2022-10-08T09:51:52Z")

</div>

To save a lot of flow starts, you could trigger it by a changed dim level of that light and a condition “dim lvl \> 0” , and parallel to that, trigger by a changed colour temperature of that light.
