From 11e268775c3915792feff5a338fe85e0c547db4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 1 Jun 2023 02:09:23 +0200 Subject: [PATCH] Update aioairzone-cloud to v0.1.7 (#93871) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update aioairzone-cloud to v0.1.7 Signed-off-by: Álvaro Fernández Rojas * airzone_cloud: fix copy&paste description Signed-off-by: Álvaro Fernández Rojas --------- Signed-off-by: Álvaro Fernández Rojas --- homeassistant/components/airzone_cloud/entity.py | 6 ++++++ homeassistant/components/airzone_cloud/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/airzone_cloud/util.py | 5 +++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/airzone_cloud/entity.py b/homeassistant/components/airzone_cloud/entity.py index 59f6aa14bf8..c7e59ee1a3f 100644 --- a/homeassistant/components/airzone_cloud/entity.py +++ b/homeassistant/components/airzone_cloud/entity.py @@ -6,6 +6,7 @@ from typing import Any from aioairzone_cloud.const import ( AZD_AIDOOS, + AZD_AVAILABLE, AZD_FIRMWARE, AZD_NAME, AZD_SYSTEM_ID, @@ -26,6 +27,11 @@ from .coordinator import AirzoneUpdateCoordinator class AirzoneEntity(CoordinatorEntity[AirzoneUpdateCoordinator], ABC): """Define an Airzone Cloud entity.""" + @property + def available(self) -> bool: + """Return Airzone Cloud entity availability.""" + return super().available and self.get_airzone_value(AZD_AVAILABLE) + @abstractmethod def get_airzone_value(self, key: str) -> Any: """Return Airzone Cloud entity value by key.""" diff --git a/homeassistant/components/airzone_cloud/manifest.json b/homeassistant/components/airzone_cloud/manifest.json index d03fe5913c2..b2899a7c80c 100644 --- a/homeassistant/components/airzone_cloud/manifest.json +++ b/homeassistant/components/airzone_cloud/manifest.json @@ -6,5 +6,5 @@ "documentation": "https://www.home-assistant.io/integrations/airzone_cloud", "iot_class": "cloud_polling", "loggers": ["aioairzone_cloud"], - "requirements": ["aioairzone-cloud==0.1.6"] + "requirements": ["aioairzone-cloud==0.1.7"] } diff --git a/requirements_all.txt b/requirements_all.txt index f8b232073f2..f6063a35016 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -116,7 +116,7 @@ aio_georss_gdacs==0.8 aioairq==0.2.4 # homeassistant.components.airzone_cloud -aioairzone-cloud==0.1.6 +aioairzone-cloud==0.1.7 # homeassistant.components.airzone aioairzone==0.6.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index c21d02028de..ee5053df08e 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -106,7 +106,7 @@ aio_georss_gdacs==0.8 aioairq==0.2.4 # homeassistant.components.airzone_cloud -aioairzone-cloud==0.1.6 +aioairzone-cloud==0.1.7 # homeassistant.components.airzone aioairzone==0.6.1 diff --git a/tests/components/airzone_cloud/util.py b/tests/components/airzone_cloud/util.py index 044cf880a16..4eab870297b 100644 --- a/tests/components/airzone_cloud/util.py +++ b/tests/components/airzone_cloud/util.py @@ -32,6 +32,7 @@ from aioairzone_cloud.const import ( API_SYSTEM_NUMBER, API_TYPE, API_WARNINGS, + API_WS_CONNECTED, API_WS_FW, API_WS_ID, API_WS_IDS, @@ -160,6 +161,7 @@ def mock_get_device_status(device: Device) -> dict[str, Any]: return { API_ERRORS: [], API_IS_CONNECTED: True, + API_WS_CONNECTED: True, API_LOCAL_TEMP: { API_CELSIUS: 21, API_FAH: 70, @@ -170,12 +172,14 @@ def mock_get_device_status(device: Device) -> dict[str, Any]: return { API_ERRORS: [], API_IS_CONNECTED: True, + API_WS_CONNECTED: True, API_WARNINGS: [], } if device.get_id() == "zone2": return { API_HUMIDITY: 24, API_IS_CONNECTED: True, + API_WS_CONNECTED: True, API_LOCAL_TEMP: { API_FAH: 77, API_CELSIUS: 25, @@ -185,6 +189,7 @@ def mock_get_device_status(device: Device) -> dict[str, Any]: return { API_HUMIDITY: 30, API_IS_CONNECTED: True, + API_WS_CONNECTED: True, API_LOCAL_TEMP: { API_FAH: 68, API_CELSIUS: 20,