From 4747de4703e93374c38267111db4188f73c41530 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Fri, 23 May 2025 16:12:13 +0200 Subject: [PATCH] Don't manipulate hvac modes based on device active mode in AVM Fritz!SmartHome (#145513) --- homeassistant/components/fritzbox/climate.py | 2 -- tests/components/fritzbox/test_climate.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/fritzbox/climate.py b/homeassistant/components/fritzbox/climate.py index 573877fa71b..ec4b09a2af2 100644 --- a/homeassistant/components/fritzbox/climate.py +++ b/homeassistant/components/fritzbox/climate.py @@ -111,11 +111,9 @@ class FritzboxThermostat(FritzBoxDeviceEntity, ClimateEntity): """Write the state to the HASS state machine.""" if self.data.holiday_active: self._attr_supported_features = ClimateEntityFeature.PRESET_MODE - self._attr_hvac_modes = [HVACMode.HEAT] self._attr_preset_modes = [PRESET_HOLIDAY] elif self.data.summer_active: self._attr_supported_features = ClimateEntityFeature.PRESET_MODE - self._attr_hvac_modes = [HVACMode.OFF] self._attr_preset_modes = [PRESET_SUMMER] else: self._attr_supported_features = SUPPORTED_FEATURES diff --git a/tests/components/fritzbox/test_climate.py b/tests/components/fritzbox/test_climate.py index bf8ce5d8a5b..e216f7d4b30 100644 --- a/tests/components/fritzbox/test_climate.py +++ b/tests/components/fritzbox/test_climate.py @@ -609,7 +609,7 @@ async def test_holidy_summer_mode( assert state assert state.attributes[ATTR_STATE_HOLIDAY_MODE] assert state.attributes[ATTR_STATE_SUMMER_MODE] is False - assert state.attributes[ATTR_HVAC_MODES] == [HVACMode.HEAT] + assert state.attributes[ATTR_HVAC_MODES] == [HVACMode.HEAT, HVACMode.OFF] assert state.attributes[ATTR_PRESET_MODE] == PRESET_HOLIDAY assert state.attributes[ATTR_PRESET_MODES] == [PRESET_HOLIDAY] @@ -645,7 +645,7 @@ async def test_holidy_summer_mode( assert state assert state.attributes[ATTR_STATE_HOLIDAY_MODE] is False assert state.attributes[ATTR_STATE_SUMMER_MODE] - assert state.attributes[ATTR_HVAC_MODES] == [HVACMode.OFF] + assert state.attributes[ATTR_HVAC_MODES] == [HVACMode.HEAT, HVACMode.OFF] assert state.attributes[ATTR_PRESET_MODE] == PRESET_SUMMER assert state.attributes[ATTR_PRESET_MODES] == [PRESET_SUMMER]