Have qty 3 of the Tuya 5 Way Ceiling Lights which advertise themselves as xdd:
xdd at Tuya API docs
and upon discovery (tried a few times) the integration never picks up the SWITCH_NIGHT_LIGHT entity.
it does get the Do not Disturb switch in switch.py and a combined light entity (which if u try color it switches off the white light and vice versa the Tuya APP treats them as two seperate lights in the same device). FWIW the xdd type in Tuya’s api - the night light refers to the RGB light and the LED refers to the white light with temp
I suspect if the SWITCH_NIGHT_LIGHT were picked up that i could create an automation to functionally make this two lights without trying to rewrite the Tuya code to allow for one device to have two lights when its an xdd.
Any thoughts on why the integration doesnt pick up on the switch_night_light?
My noodling is that the main light (switch_led) loses the color entity (colour_data) and the switch_night_light picks up the rgb related entities (work_mode,bright_value,colour_data)
Pertinent code from:
HA Github - tuya light.py
# Ceiling Light
# https://developer.tuya.com/en/docs/iot/ceiling-light?id=Kaiuz03xxfc4r
"xdd": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_temp=DPCode.TEMP_VALUE,
color_data=DPCode.COLOUR_DATA,
),
TuyaLightEntityDescription(
key=DPCode.SWITCH_NIGHT_LIGHT,
name="Night light",
),
),