Update aioairzone to v0.5.6 (#93146)

This commit is contained in:
Álvaro Fernández Rojas 2023-05-16 12:51:22 +02:00 committed by GitHub
parent 9bd49e4f1d
commit e5c12122e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 49 additions and 6 deletions

View File

@ -11,5 +11,5 @@
"documentation": "https://www.home-assistant.io/integrations/airzone",
"iot_class": "local_polling",
"loggers": ["aioairzone"],
"requirements": ["aioairzone==0.5.5"]
"requirements": ["aioairzone==0.5.6"]
}

View File

@ -116,7 +116,7 @@ aio_georss_gdacs==0.8
aioairq==0.2.4
# homeassistant.components.airzone
aioairzone==0.5.5
aioairzone==0.5.6
# homeassistant.components.ambient_station
aioambient==2023.04.0

View File

@ -106,7 +106,7 @@ aio_georss_gdacs==0.8
aioairq==0.2.4
# homeassistant.components.airzone
aioairzone==0.5.5
aioairzone==0.5.6
# homeassistant.components.ambient_station
aioambient==2023.04.0

View File

@ -45,6 +45,9 @@ async def test_form(hass: HomeAssistant) -> None:
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
side_effect=SystemOutOfRange,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_version",
return_value=HVAC_VERSION_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
return_value=HVAC_WEBSERVER_MOCK,
@ -88,6 +91,9 @@ async def test_form_invalid_system_id(hass: HomeAssistant) -> None:
) as mock_hvac, patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
side_effect=SystemOutOfRange,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_version",
return_value=HVAC_VERSION_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
side_effect=InvalidMethod,
@ -184,6 +190,9 @@ async def test_dhcp_flow(hass: HomeAssistant) -> None:
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
side_effect=SystemOutOfRange,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_version",
return_value=HVAC_VERSION_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
return_value=HVAC_WEBSERVER_MOCK,
@ -259,6 +268,9 @@ async def test_dhcp_connection_error(hass: HomeAssistant) -> None:
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
side_effect=SystemOutOfRange,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_version",
return_value=HVAC_VERSION_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
return_value=HVAC_WEBSERVER_MOCK,
@ -309,6 +321,9 @@ async def test_dhcp_invalid_system_id(hass: HomeAssistant) -> None:
) as mock_hvac, patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
side_effect=SystemOutOfRange,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_version",
return_value=HVAC_VERSION_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
side_effect=InvalidMethod,

View File

@ -10,7 +10,7 @@ from homeassistant.const import STATE_UNAVAILABLE
from homeassistant.core import HomeAssistant
from homeassistant.util.dt import utcnow
from .util import CONFIG, HVAC_MOCK
from .util import CONFIG, HVAC_MOCK, HVAC_VERSION_MOCK
from tests.common import MockConfigEntry, async_fire_time_changed
@ -31,6 +31,9 @@ async def test_coordinator_client_connector_error(hass: HomeAssistant) -> None:
) as mock_hvac, patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
side_effect=SystemOutOfRange,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_version",
return_value=HVAC_VERSION_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
side_effect=InvalidMethod,

View File

@ -7,6 +7,7 @@ from aioairzone.const import (
API_MAC,
API_SYSTEM_ID,
API_SYSTEMS,
API_VERSION,
API_WIFI_RSSI,
AZD_ID,
AZD_MASTER,
@ -15,6 +16,7 @@ from aioairzone.const import (
AZD_ZONES,
AZD_ZONES_NUM,
RAW_HVAC,
RAW_VERSION,
RAW_WEBSERVER,
)
@ -23,7 +25,13 @@ from homeassistant.components.diagnostics import REDACTED
from homeassistant.const import CONF_HOST, CONF_PORT
from homeassistant.core import HomeAssistant
from .util import CONFIG, HVAC_MOCK, HVAC_WEBSERVER_MOCK, async_init_integration
from .util import (
CONFIG,
HVAC_MOCK,
HVAC_VERSION_MOCK,
HVAC_WEBSERVER_MOCK,
async_init_integration,
)
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator
@ -41,6 +49,7 @@ async def test_config_entry_diagnostics(
"homeassistant.components.airzone.AirzoneLocalApi.raw_data",
return_value={
RAW_HVAC: HVAC_MOCK,
RAW_VERSION: HVAC_VERSION_MOCK,
RAW_WEBSERVER: HVAC_WEBSERVER_MOCK,
},
):
@ -53,6 +62,13 @@ async def test_config_entry_diagnostics(
}.items()
)
assert (
diag["api_data"][RAW_VERSION].items()
>= {
API_VERSION: HVAC_VERSION_MOCK[API_VERSION],
}.items()
)
assert (
diag["api_data"][RAW_WEBSERVER].items()
>= {

View File

@ -9,7 +9,7 @@ from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .util import CONFIG, HVAC_MOCK, HVAC_WEBSERVER_MOCK
from .util import CONFIG, HVAC_MOCK, HVAC_VERSION_MOCK, HVAC_WEBSERVER_MOCK
from tests.common import MockConfigEntry
@ -28,6 +28,9 @@ async def test_unique_id_migrate(hass: HomeAssistant) -> None:
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
side_effect=SystemOutOfRange,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_version",
return_value=HVAC_VERSION_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
side_effect=InvalidMethod,
@ -47,6 +50,9 @@ async def test_unique_id_migrate(hass: HomeAssistant) -> None:
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
side_effect=SystemOutOfRange,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_version",
return_value=HVAC_VERSION_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
return_value=HVAC_WEBSERVER_MOCK,

View File

@ -306,6 +306,9 @@ async def async_init_integration(
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac_systems",
return_value=HVAC_SYSTEMS_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_version",
return_value=HVAC_VERSION_MOCK,
), patch(
"homeassistant.components.airzone.AirzoneLocalApi.get_webserver",
return_value=HVAC_WEBSERVER_MOCK,