You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Works fine with changing the color of the device to be orange
frontRight.on('connected',()=>{console.log('Connected to device!');frontRight.set({dps: 21,set: 'colour'});//sets 21 to be colourhsv={h: 25,s: 100,v: 100}frontRight.set({dps: 24,set: hsv2tuya(hsv)});//sets color of device to be orange});
exact same thing except at the end the brightness is changed to 20%
frontRight.on('connected',()=>{console.log('Connected to device!');frontRight.set({dps: 21,set: 'colour'});//sets 21 to be colourhsv={h: 25,s: 100,v: 100}frontRight.set({dps: 24,set: hsv2tuya(hsv)});//sets color of device to be orangefrontRight.set({dps: 22,set: 200});//sets brightness to 20%});
In the above example it changes to orange for about a quarter of a second but then goes back to white and changes the brightness
The same occurs using the set multiple found in the documentation [https://codetheweb.github.io/tuyapi/index.html] :
frontRight.on('connected',()=>{console.log('Connected to device!');frontRight.set({dps: 21,set: 'colour'});//sets 21 to be colourhsv={h: 25,s: 100,v: 100}frontRight.set({multiple: true,data: {'20': true,//turns device on'21': 'colour',//changes to color'22': 1000,// changes brightness to full'24': hsv2tuya(hsv)// changes to color}});});
In this case, since the color change is after, the brightness is overridden and is never changed (switching the order makes the bulb turn white and change brightness, overriding the color)
I cant find a away to change the brightness without it first changing to white and then setting the color when I would prefer for it to stay a color and change its brightness without turning white. Any ideas why?
The text was updated successfully, but these errors were encountered:
From what I know the "brigthness" of color is part of the HSV value, so for colour mode it needs to be set as part of hsv. brightness will change the color mode to "white only".
From what I know the "brigthness" of color is part of the HSV value, so for colour mode it needs to be set as part of hsv. brightness will change the color mode to "white only".
Yep your right, I'm not used to HSV (was thinking it was more like RGBA where HSV is the color and then there is a separate value for alpha or brightness) and it turns out the V, or sometimes called B is the brightness! modifying that value and checking the brightness slider in the app shows that it's exactly that. Thanks!
It seems when setting the brightness of the device it overrides the previous commands and reverts to white without any color
Function to convert hsv
Works fine with changing the color of the device to be orange
exact same thing except at the end the brightness is changed to 20%
In the above example it changes to orange for about a quarter of a second but then goes back to white and changes the brightness
The same occurs using the
set multiple
found in the documentation [https://codetheweb.github.io/tuyapi/index.html] :In this case, since the color change is after, the brightness is overridden and is never changed (switching the order makes the bulb turn white and change brightness, overriding the color)
I cant find a away to change the brightness without it first changing to white and then setting the color when I would prefer for it to stay a color and change its brightness without turning white. Any ideas why?
The text was updated successfully, but these errors were encountered: