From 1ae809293fc0ccdc11d5dc6f1722718434fb4561 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 7 Feb 2022 11:14:48 +0100 Subject: [PATCH] Add support for qjdcz to Tuya (#65985) --- homeassistant/components/tuya/light.py | 11 +++++++++++ homeassistant/components/tuya/switch.py | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/homeassistant/components/tuya/light.py b/homeassistant/components/tuya/light.py index 88bd545c0a9..0fb75dbe6a8 100644 --- a/homeassistant/components/tuya/light.py +++ b/homeassistant/components/tuya/light.py @@ -181,6 +181,17 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { color_data=DPCode.COLOUR_DATA, ), ), + # Unknown product with light capabilities + # Fond in some diffusers, plugs and PIR flood lights + # Not documented + "qjdcz": ( + TuyaLightEntityDescription( + key=DPCode.SWITCH_LED, + color_mode=DPCode.WORK_MODE, + brightness=DPCode.BRIGHT_VALUE, + color_data=DPCode.COLOUR_DATA, + ), + ), # Heater # https://developer.tuya.com/en/docs/iot/categoryqn?id=Kaiuz18kih0sm "qn": ( diff --git a/homeassistant/components/tuya/switch.py b/homeassistant/components/tuya/switch.py index fc3d8d86baf..6be35e0102b 100644 --- a/homeassistant/components/tuya/switch.py +++ b/homeassistant/components/tuya/switch.py @@ -290,6 +290,15 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { device_class=SwitchDeviceClass.OUTLET, ), ), + # Unknown product with switch capabilities + # Fond in some diffusers, plugs and PIR flood lights + # Not documented + "qjdcz": ( + SwitchEntityDescription( + key=DPCode.SWITCH_1, + name="Switch", + ), + ), # Heater # https://developer.tuya.com/en/docs/iot/categoryqn?id=Kaiuz18kih0sm "qn": (