Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update aioairzone to v0.6.5 #98163

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/airzone/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"documentation": "https://www.home-assistant.io/integrations/airzone",
"iot_class": "local_polling",
"loggers": ["aioairzone"],
"requirements": ["aioairzone==0.6.4"]
"requirements": ["aioairzone==0.6.5"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ aioairq==0.2.4
aioairzone-cloud==0.2.1

# homeassistant.components.airzone
aioairzone==0.6.4
aioairzone==0.6.5

# homeassistant.components.ambient_station
aioambient==2023.04.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ aioairq==0.2.4
aioairzone-cloud==0.2.1

# homeassistant.components.airzone
aioairzone==0.6.4
aioairzone==0.6.5

# homeassistant.components.ambient_station
aioambient==2023.04.0
Expand Down
49 changes: 47 additions & 2 deletions tests/components/airzone/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ async def test_airzone_climate_set_hvac_mode(hass: HomeAssistant) -> None:

await async_init_integration(hass)

HVAC_MOCK = {
HVAC_MOCK_1 = {
API_DATA: [
{
API_SYSTEM_ID: 1,
Expand All @@ -340,7 +340,7 @@ async def test_airzone_climate_set_hvac_mode(hass: HomeAssistant) -> None:
}
with patch(
"homeassistant.components.airzone.AirzoneLocalApi.put_hvac",
return_value=HVAC_MOCK,
return_value=HVAC_MOCK_1,
):
await hass.services.async_call(
CLIMATE_DOMAIN,
Expand Down Expand Up @@ -407,6 +407,51 @@ async def test_airzone_climate_set_hvac_mode(hass: HomeAssistant) -> None:
state = hass.states.get("climate.airzone_2_1")
assert state.state == HVACMode.HEAT_COOL

HVAC_MOCK_4 = {
API_DATA: [
{
API_SYSTEM_ID: 1,
API_ZONE_ID: 1,
API_ON: 1,
}
]
}
with patch(
"homeassistant.components.airzone.AirzoneLocalApi.put_hvac",
return_value=HVAC_MOCK_4,
):
await hass.services.async_call(
CLIMATE_DOMAIN,
SERVICE_SET_HVAC_MODE,
{
ATTR_ENTITY_ID: "climate.salon",
ATTR_HVAC_MODE: HVACMode.FAN_ONLY,
},
blocking=True,
)

state = hass.states.get("climate.salon")
assert state.state == HVACMode.FAN_ONLY

HVAC_MOCK_NO_SET_POINT = {**HVAC_MOCK}
del HVAC_MOCK_NO_SET_POINT[API_SYSTEMS][0][API_DATA][0][API_SET_POINT]

with patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
return_value=HVAC_MOCK_NO_SET_POINT,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
return_value=HVAC_SYSTEMS_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
return_value=HVAC_WEBSERVER_MOCK,
):
async_fire_time_changed(hass, utcnow() + SCAN_INTERVAL)
await hass.async_block_till_done()

state = hass.states.get("climate.salon")
assert state.attributes.get(ATTR_TEMPERATURE) == 19.1


async def test_airzone_climate_set_hvac_slave_error(hass: HomeAssistant) -> None:
"""Test setting the HVAC mode for a slave zone."""
Expand Down