0x5e / homebridge-tuya-platform

Make homebridge-tuya-platform great again.
MIT License
206 stars 58 forks source link

Expose secondary light accessory for primary light accessories that support a working mode that sets two colors #395

Open smitty078 opened 8 months ago

smitty078 commented 8 months ago

Device Infomation JSON File

No response

Detail Informations

I have a string light that has a working mode that supports 2 colors. In my case, it does this by setting work_mode to 'scene8' and has a DP of 'flash_scene_8' that is identical in format to 'temp_value' but sets the color data for the secondary light color when 'scene8' is set.

What I'd love is if I could expose an additional light accessory with the characteristics and behaviors of an RGBC light type. Effectively this secondary light would "control" the primary light in such a way that:

on / off would toggle the work_mode DP on the parent light between "colour" and "scene8" (obviously going to be different for different manufacturers)

'temp_value' would set 'flash_scene8' (obviously going to be different for different manufacturers)

I don't think there is currently a way to do this using the built-in overrides capabilities - I believe this requires actual code on the back end. Admittedly this is a pretty custom scenario, but I feel that actually quite a few lighting accessories probably have a multi-color mode.