mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix Airzone temperature range on new climate card (#105830)
* airzone: climate: fix double setpoint Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> * tests: airzone: fix double setpoint temperature Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> * tests: airzone: fix swapped double setpoint Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> --------- Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
755dcd8bc6
commit
3be12c0611
@ -248,7 +248,6 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
|
||||
self._attr_hvac_mode = HVACMode.OFF
|
||||
self._attr_max_temp = self.get_airzone_value(AZD_TEMP_MAX)
|
||||
self._attr_min_temp = self.get_airzone_value(AZD_TEMP_MIN)
|
||||
self._attr_target_temperature = self.get_airzone_value(AZD_TEMP_SET)
|
||||
if self.supported_features & ClimateEntityFeature.FAN_MODE:
|
||||
self._attr_fan_mode = self._speeds.get(self.get_airzone_value(AZD_SPEED))
|
||||
if self.supported_features & ClimateEntityFeature.TARGET_TEMPERATURE_RANGE:
|
||||
@ -258,3 +257,5 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
|
||||
self._attr_target_temperature_low = self.get_airzone_value(
|
||||
AZD_HEAT_TEMP_SET
|
||||
)
|
||||
else:
|
||||
self._attr_target_temperature = self.get_airzone_value(AZD_TEMP_SET)
|
||||
|
@ -188,7 +188,7 @@
|
||||
'coldStages': 0,
|
||||
'coolmaxtemp': 90,
|
||||
'coolmintemp': 64,
|
||||
'coolsetpoint': 73,
|
||||
'coolsetpoint': 77,
|
||||
'errors': list([
|
||||
]),
|
||||
'floor_demand': 0,
|
||||
@ -196,7 +196,7 @@
|
||||
'heatStages': 0,
|
||||
'heatmaxtemp': 86,
|
||||
'heatmintemp': 50,
|
||||
'heatsetpoint': 77,
|
||||
'heatsetpoint': 73,
|
||||
'humidity': 0,
|
||||
'maxTemp': 90,
|
||||
'minTemp': 64,
|
||||
@ -645,7 +645,7 @@
|
||||
'cold-stage': 0,
|
||||
'cool-temp-max': 90.0,
|
||||
'cool-temp-min': 64.0,
|
||||
'cool-temp-set': 73.0,
|
||||
'cool-temp-set': 77.0,
|
||||
'demand': True,
|
||||
'double-set-point': True,
|
||||
'floor-demand': False,
|
||||
@ -653,7 +653,7 @@
|
||||
'heat-stage': 0,
|
||||
'heat-temp-max': 86.0,
|
||||
'heat-temp-min': 50.0,
|
||||
'heat-temp-set': 77.0,
|
||||
'heat-temp-set': 73.0,
|
||||
'id': 1,
|
||||
'master': True,
|
||||
'mode': 7,
|
||||
|
@ -221,7 +221,8 @@ async def test_airzone_create_climates(hass: HomeAssistant) -> None:
|
||||
assert state.attributes.get(ATTR_MAX_TEMP) == 32.2
|
||||
assert state.attributes.get(ATTR_MIN_TEMP) == 17.8
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 22.8
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_HIGH) == 25.0
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_LOW) == 22.8
|
||||
|
||||
HVAC_MOCK_CHANGED = copy.deepcopy(HVAC_MOCK)
|
||||
HVAC_MOCK_CHANGED[API_SYSTEMS][0][API_DATA][0][API_MAX_TEMP] = 25
|
||||
@ -594,8 +595,8 @@ async def test_airzone_climate_set_temp_range(hass: HomeAssistant) -> None:
|
||||
{
|
||||
API_SYSTEM_ID: 3,
|
||||
API_ZONE_ID: 1,
|
||||
API_COOL_SET_POINT: 68.0,
|
||||
API_HEAT_SET_POINT: 77.0,
|
||||
API_COOL_SET_POINT: 77.0,
|
||||
API_HEAT_SET_POINT: 68.0,
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -618,5 +619,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) == 20.0
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_LOW) == 25.0
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_HIGH) == 25.0
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_LOW) == 20.0
|
||||
|
@ -245,10 +245,10 @@ HVAC_MOCK = {
|
||||
API_ZONE_ID: 1,
|
||||
API_NAME: "DKN Plus",
|
||||
API_ON: 1,
|
||||
API_COOL_SET_POINT: 73,
|
||||
API_COOL_SET_POINT: 77,
|
||||
API_COOL_MAX_TEMP: 90,
|
||||
API_COOL_MIN_TEMP: 64,
|
||||
API_HEAT_SET_POINT: 77,
|
||||
API_HEAT_SET_POINT: 73,
|
||||
API_HEAT_MAX_TEMP: 86,
|
||||
API_HEAT_MIN_TEMP: 50,
|
||||
API_MAX_TEMP: 90,
|
||||
|
Loading…
x
Reference in New Issue
Block a user