1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Fix redundant off preset in Tuya climate (#161040)

This commit is contained in:
epenet
2026-02-06 20:58:22 +01:00
committed by GitHub
parent a53f876e09
commit 1d6c5a283e
2 changed files with 4 additions and 7 deletions

View File

@@ -48,6 +48,7 @@ TUYA_HVAC_TO_HA = {
"heat": HVACMode.HEAT,
"hot": HVACMode.HEAT,
"manual": HVACMode.HEAT_COOL,
"off": HVACMode.OFF,
"wet": HVACMode.DRY,
"wind": HVACMode.FAN_ONLY,
}
@@ -442,7 +443,9 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity):
if hvac_mode_wrapper:
self._attr_hvac_modes = [HVACMode.OFF]
for mode in hvac_mode_wrapper.options:
self._attr_hvac_modes.append(HVACMode(mode))
if mode != HVACMode.OFF:
# OFF is always added first
self._attr_hvac_modes.append(HVACMode(mode))
elif switch_wrapper:
self._attr_hvac_modes = [

View File

@@ -90,7 +90,6 @@
'preset_modes': list([
'auto',
'manual',
'off',
]),
'target_temp_step': 1.0,
}),
@@ -137,7 +136,6 @@
'preset_modes': list([
'auto',
'manual',
'off',
]),
'supported_features': <ClimateEntityFeature: 17>,
'target_temp_step': 1.0,
@@ -460,7 +458,6 @@
'preset_modes': list([
'auto',
'manual',
'off',
]),
'target_temp_step': 1.0,
}),
@@ -509,7 +506,6 @@
'preset_modes': list([
'auto',
'manual',
'off',
]),
'supported_features': <ClimateEntityFeature: 17>,
'target_temp_step': 1.0,
@@ -538,7 +534,6 @@
'preset_modes': list([
'auto',
'manual',
'off',
]),
'target_temp_step': 1.0,
}),
@@ -587,7 +582,6 @@
'preset_modes': list([
'auto',
'manual',
'off',
]),
'supported_features': <ClimateEntityFeature: 401>,
'target_temp_step': 1.0,