21.09.2023, 14:18
(21.09.2023, 12:48)admin Wrote: The script does not use color temperature in K but simply 0..100% scale from warmest to coldest. It's up to you which approach to use.
If LED parameters are known you can tune the formula to get a more consistent brightness across the whole color temperature range.
ok i made a first try with scripting but i am not sure if it is right :-)
Code:
--Tunable White
br = event.getvalue('1/5/10')
ct = event.getvalue('1/0/14')
br = 100 -- brightness (0..100%)
ct = 50 -- color temperature (0..100%; 0 = warmest, 100 = coldest)
ww = (100 - ct) * br / 100 -- warm white value (0..100%)
cw = ct * br / 100 -- cold white value (0..100%)
value = cw
grp.write('32/6/1', value)
value = ww
grp.write('32/6/2', value)
end