Tuya RGB + White ceiling light DP analysis & control both light source simultaneously

I recently purchased a ceiling light with RGB and White LEDs that could be toggled and set separately in the tuya app. However, in localtuya/tuya integration, this cannot be done as you shut the RGB off when you turn on White, and vice versa. The localtuya also cannot correctly read the lamp’s brightness/temperature. I saw several posts across several years regarding this issue but no solutions were given.

I dived deep into this type of lamp and found out that almost all settings are integrated on DP51, which could adjust every direct status of the light, for example, on/off of the RGB and White LEDs, color, brightness, temperature, etc. However, I have absolutely no idea how I could integrate this into localtuya. Can someone give me some guides to add this to the localtuya?

I’m pretty new to Home Assistant so I have no idea how to draw UI for it. It would be cool if we could design a new UI for separate control of the two types of LEDs, similar to this one on the tuya app.

For control using python and tinytuya, check this repo.

Hi,
I have made a addon that is able to control these lights via mqtt based on your code. Would be happy to share it with you but your github repo did not have any kind of license so i thought id rather not upload it on github without asking you first.

Also made a github pull request on your repo cause i confirmed that indeed rgb value is just a hue value. in combination the “rgb values” actually work together as a hsv.

Sorry I was terribly busy these days and was not monitoring this forum. The code is MIT license and I’ll update it recently. I’m sorry I also don’t have any time on modifying the code right now - I’ll dig in more later, but you can do whatever you like with the code for now.