23.05.2022, 07:00
Attach an event script to a 251.600 6 byte DALI RGBW object. The RGB part will control the color, W part will be the output brightness. Change R/G/B output addresses as needed.
Code:
value = event.getvalue()
max = math.max(1, value.red, value.green, value.blue)
mult = value.white / max
red = math.round(value.red * mult)
green = math.round(value.green * mult)
blue = math.round(value.blue * mult)
grp.write('1/1/3', red, dt.uint8)
grp.write('1/1/4', green, dt.uint8)
grp.write('1/1/5', blue, dt.uint8)