Skip to content

Commit 4c1b7ad

Browse files
authored
Update aioairzone to v0.9.4 (#127792)
1 parent 252aa14 commit 4c1b7ad

File tree

7 files changed

+152
-6
lines changed

7 files changed

+152
-6
lines changed

homeassistant/components/airzone/climate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
OperationMode.HEATING: HVACMode.HEAT,
8686
OperationMode.FAN: HVACMode.FAN_ONLY,
8787
OperationMode.DRY: HVACMode.DRY,
88+
OperationMode.AUX_HEATING: HVACMode.HEAT,
8889
OperationMode.AUTO: HVACMode.HEAT_COOL,
8990
}
9091
HVAC_MODE_HASS_TO_LIB: Final[dict[HVACMode, OperationMode]] = {
@@ -157,9 +158,10 @@ def __init__(
157158
self._attr_temperature_unit = TEMP_UNIT_LIB_TO_HASS[
158159
self.get_airzone_value(AZD_TEMP_UNIT)
159160
]
160-
self._attr_hvac_modes = [
161+
_attr_hvac_modes = [
161162
HVAC_MODE_LIB_TO_HASS[mode] for mode in self.get_airzone_value(AZD_MODES)
162163
]
164+
self._attr_hvac_modes = list(dict.fromkeys(_attr_hvac_modes))
163165
if (
164166
self.get_airzone_value(AZD_SPEED) is not None
165167
and self.get_airzone_value(AZD_SPEEDS) is not None

homeassistant/components/airzone/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
"documentation": "https://www.home-assistant.io/integrations/airzone",
1212
"iot_class": "local_polling",
1313
"loggers": ["aioairzone"],
14-
"requirements": ["aioairzone==0.9.3"]
14+
"requirements": ["aioairzone==0.9.4"]
1515
}

requirements_all.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ aioairq==0.3.2
179179
aioairzone-cloud==0.6.6
180180

181181
# homeassistant.components.airzone
182-
aioairzone==0.9.3
182+
aioairzone==0.9.4
183183

184184
# homeassistant.components.ambient_network
185185
# homeassistant.components.ambient_station

requirements_test_all.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ aioairq==0.3.2
167167
aioairzone-cloud==0.6.6
168168

169169
# homeassistant.components.airzone
170-
aioairzone==0.9.3
170+
aioairzone==0.9.4
171171

172172
# homeassistant.components.ambient_network
173173
# homeassistant.components.ambient_station

tests/components/airzone/snapshots/test_diagnostics.ambr

Lines changed: 98 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,45 @@
220220
}),
221221
]),
222222
}),
223+
dict({
224+
'data': list([
225+
dict({
226+
'air_demand': 0,
227+
'coldStage': 0,
228+
'coldStages': 0,
229+
'coolmaxtemp': 30,
230+
'coolmintemp': 15,
231+
'coolsetpoint': 20,
232+
'errors': list([
233+
]),
234+
'floor_demand': 0,
235+
'heatStage': 0,
236+
'heatStages': 0,
237+
'heatmaxtemp': 30,
238+
'heatmintemp': 15,
239+
'heatsetpoint': 20,
240+
'humidity': 0,
241+
'maxTemp': 30,
242+
'minTemp': 15,
243+
'mode': 6,
244+
'modes': list([
245+
1,
246+
2,
247+
3,
248+
4,
249+
5,
250+
6,
251+
]),
252+
'name': 'Aux Heat',
253+
'on': 1,
254+
'roomTemp': 22,
255+
'setpoint': 20,
256+
'systemID': 4,
257+
'units': 0,
258+
'zoneID': 1,
259+
}),
260+
]),
261+
}),
223262
]),
224263
}),
225264
'version': dict({
@@ -269,8 +308,8 @@
269308
'temp-set': 45,
270309
'temp-unit': 0,
271310
}),
272-
'num-systems': 3,
273-
'num-zones': 7,
311+
'num-systems': 4,
312+
'num-zones': 8,
274313
'systems': dict({
275314
'1': dict({
276315
'available': True,
@@ -320,6 +359,23 @@
320359
]),
321360
'problems': False,
322361
}),
362+
'4': dict({
363+
'available': True,
364+
'full-name': 'Airzone [4] System',
365+
'id': 4,
366+
'master-system-zone': '4:1',
367+
'master-zone': 1,
368+
'mode': 6,
369+
'modes': list([
370+
1,
371+
2,
372+
3,
373+
4,
374+
5,
375+
6,
376+
]),
377+
'problems': False,
378+
}),
323379
}),
324380
'version': '1.62',
325381
'webserver': dict({
@@ -683,6 +739,46 @@
683739
'temp-step': 1.0,
684740
'temp-unit': 1,
685741
}),
742+
'4:1': dict({
743+
'absolute-temp-max': 30.0,
744+
'absolute-temp-min': 15.0,
745+
'action': 5,
746+
'air-demand': False,
747+
'available': True,
748+
'cold-stage': 0,
749+
'cool-temp-max': 30.0,
750+
'cool-temp-min': 15.0,
751+
'cool-temp-set': 20.0,
752+
'demand': False,
753+
'double-set-point': False,
754+
'floor-demand': False,
755+
'full-name': 'Airzone [4:1] Aux Heat',
756+
'heat-stage': 0,
757+
'heat-temp-max': 30.0,
758+
'heat-temp-min': 15.0,
759+
'heat-temp-set': 20.0,
760+
'id': 1,
761+
'master': True,
762+
'mode': 6,
763+
'modes': list([
764+
1,
765+
2,
766+
3,
767+
4,
768+
5,
769+
6,
770+
]),
771+
'name': 'Aux Heat',
772+
'on': True,
773+
'problems': False,
774+
'system': 4,
775+
'temp': 22.0,
776+
'temp-max': 30.0,
777+
'temp-min': 15.0,
778+
'temp-set': 20.0,
779+
'temp-step': 0.5,
780+
'temp-unit': 0,
781+
}),
686782
}),
687783
}),
688784
})

tests/components/airzone/test_climate.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,23 @@ async def test_airzone_create_climates(hass: HomeAssistant) -> None:
225225
assert state.attributes.get(ATTR_TARGET_TEMP_HIGH) == 25.0
226226
assert state.attributes.get(ATTR_TARGET_TEMP_LOW) == 22.8
227227

228+
state = hass.states.get("climate.aux_heat")
229+
assert state.state == HVACMode.HEAT
230+
assert state.attributes.get(ATTR_CURRENT_HUMIDITY) is None
231+
assert state.attributes.get(ATTR_CURRENT_TEMPERATURE) == 22
232+
assert state.attributes.get(ATTR_HVAC_ACTION) == HVACAction.IDLE
233+
assert state.attributes.get(ATTR_HVAC_MODES) == [
234+
HVACMode.OFF,
235+
HVACMode.COOL,
236+
HVACMode.HEAT,
237+
HVACMode.FAN_ONLY,
238+
HVACMode.DRY,
239+
]
240+
assert state.attributes.get(ATTR_MAX_TEMP) == 30
241+
assert state.attributes.get(ATTR_MIN_TEMP) == 15
242+
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
243+
assert state.attributes.get(ATTR_TEMPERATURE) == 20.0
244+
228245
HVAC_MOCK_CHANGED = copy.deepcopy(HVAC_MOCK)
229246
HVAC_MOCK_CHANGED[API_SYSTEMS][0][API_DATA][0][API_MAX_TEMP] = 25
230247
HVAC_MOCK_CHANGED[API_SYSTEMS][0][API_DATA][0][API_MIN_TEMP] = 10

tests/components/airzone/util.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,37 @@
272272
},
273273
]
274274
},
275+
{
276+
API_DATA: [
277+
{
278+
API_SYSTEM_ID: 4,
279+
API_ZONE_ID: 1,
280+
API_NAME: "Aux Heat",
281+
API_ON: 1,
282+
API_COOL_SET_POINT: 20,
283+
API_COOL_MAX_TEMP: 30,
284+
API_COOL_MIN_TEMP: 15,
285+
API_HEAT_SET_POINT: 20,
286+
API_HEAT_MAX_TEMP: 30,
287+
API_HEAT_MIN_TEMP: 15,
288+
API_MAX_TEMP: 30,
289+
API_MIN_TEMP: 15,
290+
API_SET_POINT: 20,
291+
API_ROOM_TEMP: 22,
292+
API_MODES: [1, 2, 3, 4, 5, 6],
293+
API_MODE: 6,
294+
API_COLD_STAGES: 0,
295+
API_COLD_STAGE: 0,
296+
API_HEAT_STAGES: 0,
297+
API_HEAT_STAGE: 0,
298+
API_HUMIDITY: 0,
299+
API_UNITS: 0,
300+
API_ERRORS: [],
301+
API_AIR_DEMAND: 0,
302+
API_FLOOR_DEMAND: 0,
303+
},
304+
]
305+
},
275306
]
276307
}
277308

0 commit comments

Comments
 (0)