(20.02.2019, 07:39)admin Wrote: Why not use a formula to calculate warm/cold white values based on color temp instead of copy-pasting hundreds lines of code?
For control you probably need just two objects: dimming and color temperature. If binary control is also needed you just create a script that sets dimming and color temperature to preset values.
Yes,
The script with formula :
valtemp = grp.getvalue('34/1/7')
val1= (valtemp - 2700)/19
val2= (6500 - valtemp)/19
if valtemp <=4600 then
grp.write('34/1/3', 100)
grp.write('34/1/4', val1)
elseif valtemp >4600 then
grp.write('34/1/3', val2)
grp.write('34/1/4', 100)
end
Just for my table excel if you put values such as 10% cold and 10% hot there will be no match.
B.R.