Closed batuttu closed 10 months ago
Interesting. I assume the bulb has some brightness default it uses when receiving the command to switch to color mode (which is part of the set_colour() function). It would be interesting to test some of these...
# Changing mode change brightness?
d.set_mode(mode="colour")
# Try using nowait
d.set_brightness(200, nowait=True)
d.set_colour(r,g,b, nowait=True)
d.set_brightness(500, nowait=True)
# Send color command without changing mode
d.set_brightness(200)
payload = d.generate_payload(
CONTROL,
{
d.DPS_INDEX_COLOUR[d.bulb_type]: d._rgb_to_hexvalue(r, g, b, d.bulb_type),
},
)
data = d._send_receive(payload)
d.set_brightness(500)
# Changing mode change brightness? / Yes :/
# Nowait is not working :/
# Send color command without changing mode / Same, not working :/
What's the output of print(d.status())
and print(d.bulb_type)
?
Since we haven't heard back in 2 week I'm going to go ahead and close this. Feel free to re-open if you're still having issues.
Hi, d.set_brightness(200) d.set_colour(r,g,b) d.set_brightness(500) When you want to write the code this way, the brightness changes instantly in the set_colour line.