Variabel to cocohue

When using variabel = 0 for a bulb level in cocohue it sets the level for the bulb to 100 where it rather should be 0 (turned off)

I made an "if this then" to turn of the bulbs, I was just wondering if it can not work with zero, other settings works.

There is some information missing from your post that would be helpful to know. CoCoHue itself (the app or drivers) cannot use variables, so clearly there is some app (e.g., a rule or other app) that you are using to do this. Seeing the setup of that app may be helpful.

Beyond that, you can try running the "Set Level" command yourself from the device detail page for the CoCoHue device in question. If providing a value of 0 there works as expected, there could be something wrong with the variable or other app not doing something as expected with this value. I would generally recommend avoiding doing a Set Level to 0 however. Is there a reason you are not just calling the "Off" command directly?

Finally, note that the "level" and "switch" attributes (which you'll see under "Current States" on the device detail page) are separate. You will rarely see a level of 0 for any device. If you want ot see whether it is on or not, that is what the "switch" attribute shows. The "level" attribute normally shows the last known level, regardless of whether the device is currently on or off. So, seeing 100 there when the device is off is not a problem. I don't know if this is what you mean.

Hello Bert and thank you for your time and answer.
I have to read it again and give you answers, but right now I am very busy with personal issues, however later this week I will be back.