From 3e0856ccac9ac6c779b8c8db189574ff774a9921 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 3 Feb 2022 14:00:03 +0100 Subject: [PATCH] Fix missing windspeed in Tuya climate (#65511) --- homeassistant/components/tuya/climate.py | 4 +++- homeassistant/components/tuya/const.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/tuya/climate.py b/homeassistant/components/tuya/climate.py index cbb778e34b1..a97a27a7453 100644 --- a/homeassistant/components/tuya/climate.py +++ b/homeassistant/components/tuya/climate.py @@ -223,7 +223,9 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity): # Determine fan modes if enum_type := self.find_dpcode( - DPCode.FAN_SPEED_ENUM, dptype=DPType.ENUM, prefer_function=True + (DPCode.FAN_SPEED_ENUM, DPCode.WINDSPEED), + dptype=DPType.ENUM, + prefer_function=True, ): self._attr_supported_features |= SUPPORT_FAN_MODE self._attr_fan_modes = enum_type.range diff --git a/homeassistant/components/tuya/const.py b/homeassistant/components/tuya/const.py index 79b01140875..7765cd27322 100644 --- a/homeassistant/components/tuya/const.py +++ b/homeassistant/components/tuya/const.py @@ -367,6 +367,7 @@ class DPCode(StrEnum): WATER_SET = "water_set" # Water level WATERSENSOR_STATE = "watersensor_state" WET = "wet" # Humidification + WINDSPEED = "windspeed" WIRELESS_BATTERYLOCK = "wireless_batterylock" WIRELESS_ELECTRICITY = "wireless_electricity" WORK_MODE = "work_mode" # Working mode