Welcome to Smart Home Forum by FIBARO
Search the Community
Showing results for tags 'slider value'.
I have made a slider in a virtual device for my lightwave lights. They have a normal range of 0-32, so in my virtual device slider i have used: local LWRF_DimLevel = math.floor((_sliderValue_ / 100) * 32) However when I put the slider between the values of 0-4 (so very dim) the actual light level goes to 100% brightness. I assume my math.floor must need changing? Or is there any code I can use to not allow the slider to go below say 5? Or if slider <5 then 'press button' off for example?