From b58c8eaaa9653524267b6084b9e07a16e16802e4 Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Fri, 15 Dec 2023 18:14:53 +0100 Subject: [PATCH] Fix HVAC mode duplication for Shelly Gen2 climate platform (#105812) Fix HVAC mode duplication --- homeassistant/components/shelly/climate.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/shelly/climate.py b/homeassistant/components/shelly/climate.py index 6a592c904f6..396fef5ac2e 100644 --- a/homeassistant/components/shelly/climate.py +++ b/homeassistant/components/shelly/climate.py @@ -419,7 +419,6 @@ class BlockSleepingClimate( class RpcClimate(ShellyRpcEntity, ClimateEntity): """Entity that controls a thermostat on RPC based Shelly devices.""" - _attr_hvac_modes = [HVACMode.OFF] _attr_icon = "mdi:thermostat" _attr_max_temp = RPC_THERMOSTAT_SETTINGS["max"] _attr_min_temp = RPC_THERMOSTAT_SETTINGS["min"] @@ -435,9 +434,9 @@ class RpcClimate(ShellyRpcEntity, ClimateEntity): "type", "heating" ) if self._thermostat_type == "cooling": - self._attr_hvac_modes.append(HVACMode.COOL) + self._attr_hvac_modes = [HVACMode.OFF, HVACMode.COOL] else: - self._attr_hvac_modes.append(HVACMode.HEAT) + self._attr_hvac_modes = [HVACMode.OFF, HVACMode.HEAT] @property def target_temperature(self) -> float | None: