Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions homeassistant/components/knx/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ def _create_climate_ui(xknx: XKNX, conf: ConfigExtractor, name: str) -> XknxClim
group_address_active_state=conf.get_state_and_passive(CONF_GA_ACTIVE),
group_address_command_value_state=conf.get_state_and_passive(CONF_GA_VALVE),
sync_state=sync_state,
min_temp=conf.get(ClimateConf.MIN_TEMP),
max_temp=conf.get(ClimateConf.MAX_TEMP),
min_temp=conf.get(CONF_TARGET_TEMPERATURE, ClimateConf.MIN_TEMP),
max_temp=conf.get(CONF_TARGET_TEMPERATURE, ClimateConf.MAX_TEMP),
mode=climate_mode,
group_address_fan_speed=conf.get_write(CONF_GA_FAN_SPEED),
group_address_fan_speed_state=conf.get_state_and_passive(CONF_GA_FAN_SPEED),
Expand Down Expand Up @@ -486,7 +486,7 @@ def hvac_modes(self) -> list[HVACMode]:
ha_controller_modes.append(self._last_hvac_mode)
ha_controller_modes.append(HVACMode.OFF)

hvac_modes = list(set(filter(None, ha_controller_modes)))
hvac_modes = sorted(set(filter(None, ha_controller_modes)))
return (
hvac_modes
if hvac_modes
Expand Down
20 changes: 20 additions & 0 deletions tests/components/knx/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,8 +1016,28 @@ async def test_climate_ui_load(knx: KNXTestKit) -> None:
knx.assert_state(
"climate.direct_indi_op_heat_cool",
HVACMode.HEAT,
current_temperature=20.0,
command_value=None,
min_temp=10.0,
max_temp=24.0,
target_temp_step=0.1,
preset_modes=["comfort", "standby", "economy", "building_protection"],
preset_mode="comfort",
hvac_modes=["cool", "heat", "off"],
hvac_action="heating",
supported_features=401,
)
knx.assert_state(
"climate.sps_op_mode_contr_mode",
HVACMode.COOL,
current_temperature=20.0,
command_value=13,
min_temp=14.0,
max_temp=30.0,
target_temp_step=0.5,
preset_modes=["comfort", "standby", "economy", "building_protection"],
preset_mode="comfort",
hvac_modes=["auto", "cool", "dry", "fan_only", "heat", "off"],
hvac_action="cooling",
supported_features=953,
)
Loading