From ba901bbbbfcec6ad0818a197ff6c518bb98bd64d Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 25 Oct 2021 22:55:21 +0200 Subject: [PATCH] Complete Air Conditioner (kt) device support for Tuya (#58417) --- homeassistant/components/tuya/light.py | 8 ++++++++ homeassistant/components/tuya/switch.py | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/homeassistant/components/tuya/light.py b/homeassistant/components/tuya/light.py index 10aa8806a81..dbae8e2e57f 100644 --- a/homeassistant/components/tuya/light.py +++ b/homeassistant/components/tuya/light.py @@ -127,6 +127,14 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { name="Backlight", ), ), + # Air conditioner + # https://developer.tuya.com/en/docs/iot/categorykt?id=Kaiuz0z71ov2n + "kt": ( + TuyaLightEntityDescription( + key=DPCode.LIGHT, + name="Backlight", + ), + ), # Smart Camera # https://developer.tuya.com/en/docs/iot/categorysp?id=Kaiuz35leyo12 "sp": ( diff --git a/homeassistant/components/tuya/switch.py b/homeassistant/components/tuya/switch.py index bc83c085783..6f0f7b85b17 100644 --- a/homeassistant/components/tuya/switch.py +++ b/homeassistant/components/tuya/switch.py @@ -189,6 +189,22 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { entity_category=ENTITY_CATEGORY_CONFIG, ), ), + # Air conditioner + # https://developer.tuya.com/en/docs/iot/categorykt?id=Kaiuz0z71ov2n + "kt": ( + SwitchEntityDescription( + key=DPCode.ANION, + name="Ionizer", + icon="mdi:minus-circle-outline", + entity_category=ENTITY_CATEGORY_CONFIG, + ), + SwitchEntityDescription( + key=DPCode.LOCK, + name="Child Lock", + icon="mdi:account-lock", + entity_category=ENTITY_CATEGORY_CONFIG, + ), + ), # Power Socket # https://developer.tuya.com/en/docs/iot/s?id=K9gf7o5prgf7s "pc": (