From 42a2aed8afe012a6ccad98d9c919a5b027e66a94 Mon Sep 17 00:00:00 2001 From: Franck Nijhof <git@frenck.dev> Date: Fri, 29 Oct 2021 00:27:22 +0200 Subject: [PATCH] Fix missing temperature level on Tuya Heater (qn) devices (#58643) --- homeassistant/components/tuya/const.py | 1 + homeassistant/components/tuya/select.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/homeassistant/components/tuya/const.py b/homeassistant/components/tuya/const.py index db43ec7a8eb..a9f7afb0ec5 100644 --- a/homeassistant/components/tuya/const.py +++ b/homeassistant/components/tuya/const.py @@ -210,6 +210,7 @@ class DPCode(str, Enum): LED_TYPE_1 = "led_type_1" LED_TYPE_2 = "led_type_2" LED_TYPE_3 = "led_type_3" + LEVEL = "level" LIGHT = "light" # Light LIGHT_MODE = "light_mode" LOCK = "lock" # Lock / Child lock diff --git a/homeassistant/components/tuya/select.py b/homeassistant/components/tuya/select.py index f56d2929a84..6df5b4e84dd 100644 --- a/homeassistant/components/tuya/select.py +++ b/homeassistant/components/tuya/select.py @@ -75,6 +75,15 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { entity_category=ENTITY_CATEGORY_CONFIG, ), ), + # Heater + # https://developer.tuya.com/en/docs/iot/categoryqn?id=Kaiuz18kih0sm + "qn": ( + SelectEntityDescription( + key=DPCode.LEVEL, + name="Temperature Level", + icon="mdi:thermometer-lines", + ), + ), # Siren Alarm # https://developer.tuya.com/en/docs/iot/categorysgbj?id=Kaiuz37tlpbnu "sgbj": ( -- GitLab