Update aioairzone to v0.6.6 (#98399)
This commit is contained in:
parent
d6fcdeac06
commit
c3c00e6984
9 changed files with 75 additions and 6 deletions
|
@ -11,5 +11,5 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/airzone",
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["aioairzone"],
|
||||
"requirements": ["aioairzone==0.6.5"]
|
||||
"requirements": ["aioairzone==0.6.6"]
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ aioairq==0.2.4
|
|||
aioairzone-cloud==0.2.1
|
||||
|
||||
# homeassistant.components.airzone
|
||||
aioairzone==0.6.5
|
||||
aioairzone==0.6.6
|
||||
|
||||
# homeassistant.components.ambient_station
|
||||
aioambient==2023.04.0
|
||||
|
|
|
@ -169,7 +169,7 @@ aioairq==0.2.4
|
|||
aioairzone-cloud==0.2.1
|
||||
|
||||
# homeassistant.components.airzone
|
||||
aioairzone==0.6.5
|
||||
aioairzone==0.6.6
|
||||
|
||||
# homeassistant.components.ambient_station
|
||||
aioambient==2023.04.0
|
||||
|
|
|
@ -54,6 +54,7 @@ from homeassistant.exceptions import HomeAssistantError
|
|||
from homeassistant.util.dt import utcnow
|
||||
|
||||
from .util import (
|
||||
HVAC_DHW_MOCK,
|
||||
HVAC_MOCK,
|
||||
HVAC_SYSTEMS_MOCK,
|
||||
HVAC_WEBSERVER_MOCK,
|
||||
|
@ -226,6 +227,9 @@ async def test_airzone_create_climates(hass: HomeAssistant) -> None:
|
|||
HVAC_MOCK_CHANGED[API_SYSTEMS][0][API_DATA][0][API_MIN_TEMP] = 10
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
return_value=HVAC_DHW_MOCK,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK_CHANGED,
|
||||
), patch(
|
||||
|
@ -437,6 +441,9 @@ async def test_airzone_climate_set_hvac_mode(hass: HomeAssistant) -> None:
|
|||
del HVAC_MOCK_NO_SET_POINT[API_SYSTEMS][0][API_DATA][0][API_SET_POINT]
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
return_value=HVAC_DHW_MOCK,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK_NO_SET_POINT,
|
||||
), patch(
|
||||
|
|
|
@ -5,6 +5,7 @@ from unittest.mock import patch
|
|||
from aioairzone.const import API_MAC, API_SYSTEMS
|
||||
from aioairzone.exceptions import (
|
||||
AirzoneError,
|
||||
HotWaterNotAvailable,
|
||||
InvalidMethod,
|
||||
InvalidSystem,
|
||||
SystemOutOfRange,
|
||||
|
@ -19,7 +20,14 @@ from homeassistant.const import CONF_HOST, CONF_ID, CONF_PORT
|
|||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.data_entry_flow import FlowResultType
|
||||
|
||||
from .util import CONFIG, CONFIG_ID1, HVAC_MOCK, HVAC_VERSION_MOCK, HVAC_WEBSERVER_MOCK
|
||||
from .util import (
|
||||
CONFIG,
|
||||
CONFIG_ID1,
|
||||
HVAC_DHW_MOCK,
|
||||
HVAC_MOCK,
|
||||
HVAC_VERSION_MOCK,
|
||||
HVAC_WEBSERVER_MOCK,
|
||||
)
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
|
@ -41,6 +49,9 @@ async def test_form(hass: HomeAssistant) -> None:
|
|||
"homeassistant.components.airzone.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry, patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
return_value=HVAC_DHW_MOCK,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK,
|
||||
), patch(
|
||||
|
@ -87,6 +98,9 @@ async def test_form_invalid_system_id(hass: HomeAssistant) -> None:
|
|||
"homeassistant.components.airzone.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry, patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
side_effect=HotWaterNotAvailable,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
side_effect=InvalidSystem,
|
||||
) as mock_hvac, patch(
|
||||
|
@ -186,6 +200,9 @@ async def test_dhcp_flow(hass: HomeAssistant) -> None:
|
|||
"homeassistant.components.airzone.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry, patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
return_value=HVAC_DHW_MOCK,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK,
|
||||
), patch(
|
||||
|
@ -264,6 +281,9 @@ async def test_dhcp_connection_error(hass: HomeAssistant) -> None:
|
|||
"homeassistant.components.airzone.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry, patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
return_value=HVAC_DHW_MOCK,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK,
|
||||
), patch(
|
||||
|
@ -317,6 +337,9 @@ async def test_dhcp_invalid_system_id(hass: HomeAssistant) -> None:
|
|||
"homeassistant.components.airzone.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry, patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
side_effect=HotWaterNotAvailable,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
side_effect=InvalidSystem,
|
||||
) as mock_hvac, patch(
|
||||
|
|
|
@ -2,7 +2,12 @@
|
|||
|
||||
from unittest.mock import patch
|
||||
|
||||
from aioairzone.exceptions import AirzoneError, InvalidMethod, SystemOutOfRange
|
||||
from aioairzone.exceptions import (
|
||||
AirzoneError,
|
||||
HotWaterNotAvailable,
|
||||
InvalidMethod,
|
||||
SystemOutOfRange,
|
||||
)
|
||||
|
||||
from homeassistant.components.airzone.const import DOMAIN
|
||||
from homeassistant.components.airzone.coordinator import SCAN_INTERVAL
|
||||
|
@ -26,6 +31,9 @@ async def test_coordinator_client_connector_error(hass: HomeAssistant) -> None:
|
|||
config_entry.add_to_hass(hass)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
side_effect=HotWaterNotAvailable,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK,
|
||||
) as mock_hvac, patch(
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
from unittest.mock import patch
|
||||
|
||||
from aioairzone.exceptions import InvalidMethod, SystemOutOfRange
|
||||
from aioairzone.exceptions import HotWaterNotAvailable, InvalidMethod, SystemOutOfRange
|
||||
|
||||
from homeassistant.components.airzone.const import DOMAIN
|
||||
from homeassistant.config_entries import ConfigEntryState
|
||||
|
@ -23,6 +23,9 @@ async def test_unique_id_migrate(hass: HomeAssistant) -> None:
|
|||
config_entry.add_to_hass(hass)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
side_effect=HotWaterNotAvailable,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK,
|
||||
), patch(
|
||||
|
@ -45,6 +48,9 @@ async def test_unique_id_migrate(hass: HomeAssistant) -> None:
|
|||
)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
side_effect=HotWaterNotAvailable,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK,
|
||||
), patch(
|
||||
|
|
|
@ -10,6 +10,7 @@ from homeassistant.core import HomeAssistant
|
|||
from homeassistant.util.dt import utcnow
|
||||
|
||||
from .util import (
|
||||
HVAC_DHW_MOCK,
|
||||
HVAC_MOCK,
|
||||
HVAC_SYSTEMS_MOCK,
|
||||
HVAC_VERSION_MOCK,
|
||||
|
@ -86,6 +87,9 @@ async def test_airzone_sensors_availability(
|
|||
del HVAC_MOCK_UNAVAILABLE_ZONE[API_SYSTEMS][0][API_DATA][1]
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
return_value=HVAC_DHW_MOCK,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK_UNAVAILABLE_ZONE,
|
||||
), patch(
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
from unittest.mock import patch
|
||||
|
||||
from aioairzone.const import (
|
||||
API_ACS_MAX_TEMP,
|
||||
API_ACS_MIN_TEMP,
|
||||
API_ACS_ON,
|
||||
API_ACS_POWER_MODE,
|
||||
API_ACS_SET_POINT,
|
||||
API_ACS_TEMP,
|
||||
API_AIR_DEMAND,
|
||||
API_COLD_ANGLE,
|
||||
API_COLD_STAGE,
|
||||
|
@ -266,6 +272,18 @@ HVAC_MOCK = {
|
|||
]
|
||||
}
|
||||
|
||||
HVAC_DHW_MOCK = {
|
||||
API_DATA: {
|
||||
API_SYSTEM_ID: 0,
|
||||
API_ACS_TEMP: 43,
|
||||
API_ACS_SET_POINT: 45,
|
||||
API_ACS_MAX_TEMP: 75,
|
||||
API_ACS_MIN_TEMP: 30,
|
||||
API_ACS_ON: 1,
|
||||
API_ACS_POWER_MODE: 0,
|
||||
}
|
||||
}
|
||||
|
||||
HVAC_SYSTEMS_MOCK = {
|
||||
API_SYSTEMS: [
|
||||
{
|
||||
|
@ -301,6 +319,9 @@ async def async_init_integration(
|
|||
config_entry.add_to_hass(hass)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_dhw",
|
||||
return_value=HVAC_DHW_MOCK,
|
||||
), patch(
|
||||
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
|
||||
return_value=HVAC_MOCK,
|
||||
), patch(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue