mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Don't manipulate hvac modes based on device active mode in AVM Fritz!SmartHome (#145513)
This commit is contained in:
parent
fc2fe32f34
commit
4747de4703
@ -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
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user