mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Fix KNX climate loading min/max temp from UI config (#155682)
This commit is contained in:
committed by
Bram Kragten
parent
69b82d4c59
commit
6616b5775f
@@ -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),
|
||||
@@ -486,7 +486,7 @@ class _KnxClimate(ClimateEntity, _KnxEntityBase):
|
||||
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
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user