28.07.2025, 11:18
(28.07.2025, 05:45)Sral1987 Wrote:(24.07.2025, 14:29)NKereshki Wrote:Change your Code to(24.07.2025, 12:54)admin Wrote: Do you use the same object for control and status? What is the event script attached to this object? Why do you use string data type instead of 2 byte unsigned?
1. I used the same object for control and status. I removed the status part for testing.
2. I'm applying the script as an event script.
3. I changed it to 2-byte unsigned. After these changes, the problem remains.
Code:--Control HUE from TW object (color temperature) (use as event based script)
require('user.hue')
lamp_id = 12
bri = grp.getvalue('32/2/9') -- 0..100%
ct = grp.getvalue('32/4/9') -- 2000K..6500K
setBrightnessCT(lamp_id, bri, ct)
Now you controll only the Colortemperature, for brightness use a seperate EventCode:--Control HUE from TW object (color temperature) (use as event based script)
require('user.hue')
lamp_id = 12
--bri = grp.getvalue('32/2/9') -- 0..100%
ct = grp.getvalue('32/4/9') -- 2000K..6500K
setBrightnessCT(lamp_id, bri, ct)
Hello,
First, I want to thank you for your help. Unfortunately, when I remove the brightness line from the script, the color temperature also stops being controlled. I'm using the script you showed me.
Best regards,
Nayden