mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
airzone: update aioairzone to v0.5.2 (#84690)
This commit is contained in:
parent
29797b93f7
commit
5d4591a3ec
@ -3,7 +3,7 @@
|
|||||||
"name": "Airzone",
|
"name": "Airzone",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/airzone",
|
"documentation": "https://www.home-assistant.io/integrations/airzone",
|
||||||
"requirements": ["aioairzone==0.5.1"],
|
"requirements": ["aioairzone==0.5.2"],
|
||||||
"codeowners": ["@Noltari"],
|
"codeowners": ["@Noltari"],
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["aioairzone"],
|
"loggers": ["aioairzone"],
|
||||||
|
@ -119,7 +119,7 @@ aio_georss_gdacs==0.7
|
|||||||
aioairq==0.2.4
|
aioairq==0.2.4
|
||||||
|
|
||||||
# homeassistant.components.airzone
|
# homeassistant.components.airzone
|
||||||
aioairzone==0.5.1
|
aioairzone==0.5.2
|
||||||
|
|
||||||
# homeassistant.components.ambient_station
|
# homeassistant.components.ambient_station
|
||||||
aioambient==2021.11.0
|
aioambient==2021.11.0
|
||||||
|
@ -106,7 +106,7 @@ aio_georss_gdacs==0.7
|
|||||||
aioairq==0.2.4
|
aioairq==0.2.4
|
||||||
|
|
||||||
# homeassistant.components.airzone
|
# homeassistant.components.airzone
|
||||||
aioairzone==0.5.1
|
aioairzone==0.5.2
|
||||||
|
|
||||||
# homeassistant.components.ambient_station
|
# homeassistant.components.ambient_station
|
||||||
aioambient==2021.11.0
|
aioambient==2021.11.0
|
||||||
|
@ -78,3 +78,9 @@ async def test_airzone_create_binary_sensors(hass: HomeAssistant) -> None:
|
|||||||
|
|
||||||
state = hass.states.get("binary_sensor.salon_problem")
|
state = hass.states.get("binary_sensor.salon_problem")
|
||||||
assert state.state == STATE_OFF
|
assert state.state == STATE_OFF
|
||||||
|
|
||||||
|
state = hass.states.get("binary_sensor.airzone_2_1_battery_low")
|
||||||
|
assert state is None
|
||||||
|
|
||||||
|
state = hass.states.get("binary_sensor.airzone_2_1_problem")
|
||||||
|
assert state.state == STATE_OFF
|
||||||
|
@ -131,6 +131,20 @@ async def test_airzone_create_climates(hass: HomeAssistant) -> None:
|
|||||||
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
|
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
|
||||||
assert state.attributes.get(ATTR_TEMPERATURE) == 19.1
|
assert state.attributes.get(ATTR_TEMPERATURE) == 19.1
|
||||||
|
|
||||||
|
state = hass.states.get("climate.airzone_2_1")
|
||||||
|
assert state.state == HVACMode.OFF
|
||||||
|
assert state.attributes.get(ATTR_CURRENT_HUMIDITY) == 62
|
||||||
|
assert state.attributes.get(ATTR_CURRENT_TEMPERATURE) == 22.3
|
||||||
|
assert state.attributes.get(ATTR_HVAC_ACTION) == HVACAction.OFF
|
||||||
|
assert state.attributes.get(ATTR_HVAC_MODES) == [
|
||||||
|
HVACMode.HEAT_COOL,
|
||||||
|
HVACMode.OFF,
|
||||||
|
]
|
||||||
|
assert state.attributes.get(ATTR_MAX_TEMP) == 30
|
||||||
|
assert state.attributes.get(ATTR_MIN_TEMP) == 15
|
||||||
|
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
|
||||||
|
assert state.attributes.get(ATTR_TEMPERATURE) == 19.0
|
||||||
|
|
||||||
|
|
||||||
async def test_airzone_climate_turn_on_off(hass: HomeAssistant) -> None:
|
async def test_airzone_climate_turn_on_off(hass: HomeAssistant) -> None:
|
||||||
"""Test turning on."""
|
"""Test turning on."""
|
||||||
@ -187,6 +201,31 @@ async def test_airzone_climate_turn_on_off(hass: HomeAssistant) -> None:
|
|||||||
state = hass.states.get("climate.salon")
|
state = hass.states.get("climate.salon")
|
||||||
assert state.state == HVACMode.OFF
|
assert state.state == HVACMode.OFF
|
||||||
|
|
||||||
|
HVAC_MOCK = {
|
||||||
|
API_DATA: [
|
||||||
|
{
|
||||||
|
API_SYSTEM_ID: 2,
|
||||||
|
API_ZONE_ID: 1,
|
||||||
|
API_ON: 1,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
with patch(
|
||||||
|
"homeassistant.components.airzone.AirzoneLocalApi.put_hvac",
|
||||||
|
return_value=HVAC_MOCK,
|
||||||
|
):
|
||||||
|
await hass.services.async_call(
|
||||||
|
CLIMATE_DOMAIN,
|
||||||
|
SERVICE_TURN_ON,
|
||||||
|
{
|
||||||
|
ATTR_ENTITY_ID: "climate.airzone_2_1",
|
||||||
|
},
|
||||||
|
blocking=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
state = hass.states.get("climate.airzone_2_1")
|
||||||
|
assert state.state == HVACMode.HEAT_COOL
|
||||||
|
|
||||||
|
|
||||||
async def test_airzone_climate_set_hvac_mode(hass: HomeAssistant) -> None:
|
async def test_airzone_climate_set_hvac_mode(hass: HomeAssistant) -> None:
|
||||||
"""Test setting the HVAC mode."""
|
"""Test setting the HVAC mode."""
|
||||||
@ -246,6 +285,32 @@ async def test_airzone_climate_set_hvac_mode(hass: HomeAssistant) -> None:
|
|||||||
state = hass.states.get("climate.salon")
|
state = hass.states.get("climate.salon")
|
||||||
assert state.state == HVACMode.OFF
|
assert state.state == HVACMode.OFF
|
||||||
|
|
||||||
|
HVAC_MOCK_3 = {
|
||||||
|
API_DATA: [
|
||||||
|
{
|
||||||
|
API_SYSTEM_ID: 2,
|
||||||
|
API_ZONE_ID: 1,
|
||||||
|
API_ON: 1,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
with patch(
|
||||||
|
"homeassistant.components.airzone.AirzoneLocalApi.put_hvac",
|
||||||
|
return_value=HVAC_MOCK_3,
|
||||||
|
):
|
||||||
|
await hass.services.async_call(
|
||||||
|
CLIMATE_DOMAIN,
|
||||||
|
SERVICE_SET_HVAC_MODE,
|
||||||
|
{
|
||||||
|
ATTR_ENTITY_ID: "climate.airzone_2_1",
|
||||||
|
ATTR_HVAC_MODE: HVACMode.HEAT_COOL,
|
||||||
|
},
|
||||||
|
blocking=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
state = hass.states.get("climate.airzone_2_1")
|
||||||
|
assert state.state == HVACMode.HEAT_COOL
|
||||||
|
|
||||||
|
|
||||||
async def test_airzone_climate_set_hvac_slave_error(hass: HomeAssistant) -> None:
|
async def test_airzone_climate_set_hvac_slave_error(hass: HomeAssistant) -> None:
|
||||||
"""Test setting the HVAC mode for a slave zone."""
|
"""Test setting the HVAC mode for a slave zone."""
|
||||||
|
@ -48,3 +48,9 @@ async def test_airzone_create_sensors(
|
|||||||
|
|
||||||
state = hass.states.get("sensor.salon_humidity")
|
state = hass.states.get("sensor.salon_humidity")
|
||||||
assert state.state == "34"
|
assert state.state == "34"
|
||||||
|
|
||||||
|
state = hass.states.get("sensor.airzone_2_1_temperature")
|
||||||
|
assert state.state == "22.3"
|
||||||
|
|
||||||
|
state = hass.states.get("sensor.airzone_2_1_humidity")
|
||||||
|
assert state.state == "62"
|
||||||
|
@ -177,7 +177,27 @@ HVAC_MOCK = {
|
|||||||
API_FLOOR_DEMAND: 0,
|
API_FLOOR_DEMAND: 0,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
API_DATA: [
|
||||||
|
{
|
||||||
|
API_SYSTEM_ID: 2,
|
||||||
|
API_ZONE_ID: 1,
|
||||||
|
API_ON: 0,
|
||||||
|
API_MAX_TEMP: 30,
|
||||||
|
API_MIN_TEMP: 15,
|
||||||
|
API_SET_POINT: 19,
|
||||||
|
API_ROOM_TEMP: 22.299999,
|
||||||
|
API_COLD_STAGES: 1,
|
||||||
|
API_COLD_STAGE: 1,
|
||||||
|
API_HEAT_STAGES: 1,
|
||||||
|
API_HEAT_STAGE: 1,
|
||||||
|
API_HUMIDITY: 62,
|
||||||
|
API_UNITS: 0,
|
||||||
|
API_ERRORS: [],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user