Skip to content

Commit

Permalink
Fix Airzone climate double setpoint (home-assistant#101744)
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  • Loading branch information
Noltari authored Oct 10, 2023
1 parent 00abf49 commit f78199d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions homeassistant/components/airzone/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ async def async_set_temperature(self, **kwargs: Any) -> None:
if ATTR_TEMPERATURE in kwargs:
params[API_SET_POINT] = kwargs[ATTR_TEMPERATURE]
if ATTR_TARGET_TEMP_LOW in kwargs and ATTR_TARGET_TEMP_HIGH in kwargs:
params[API_COOL_SET_POINT] = kwargs[ATTR_TARGET_TEMP_LOW]
params[API_HEAT_SET_POINT] = kwargs[ATTR_TARGET_TEMP_HIGH]
params[API_COOL_SET_POINT] = kwargs[ATTR_TARGET_TEMP_HIGH]
params[API_HEAT_SET_POINT] = kwargs[ATTR_TARGET_TEMP_LOW]
await self._async_update_hvac_params(params)

@callback
Expand Down Expand Up @@ -248,8 +248,8 @@ def _async_update_attrs(self) -> None:
self._attr_fan_mode = self._speeds.get(self.get_airzone_value(AZD_SPEED))
if self.supported_features & ClimateEntityFeature.TARGET_TEMPERATURE_RANGE:
self._attr_target_temperature_high = self.get_airzone_value(
AZD_HEAT_TEMP_SET
AZD_COOL_TEMP_SET
)
self._attr_target_temperature_low = self.get_airzone_value(
AZD_COOL_TEMP_SET
AZD_HEAT_TEMP_SET
)
4 changes: 2 additions & 2 deletions tests/components/airzone/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,5 +615,5 @@ async def test_airzone_climate_set_temp_range(hass: HomeAssistant) -> None:
)

state = hass.states.get("climate.dkn_plus")
assert state.attributes.get(ATTR_TARGET_TEMP_HIGH) == 25.0
assert state.attributes.get(ATTR_TARGET_TEMP_LOW) == 20.0
assert state.attributes.get(ATTR_TARGET_TEMP_HIGH) == 20.0
assert state.attributes.get(ATTR_TARGET_TEMP_LOW) == 25.0

0 comments on commit f78199d

Please sign in to comment.