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:
@@ -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 = [
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user