From 8c01decef7e574dceff12bc1cec0f04ce2f705d2 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Mon, 11 Apr 2022 10:27:49 -0700 Subject: [PATCH] Bump dependencies in Overkiz integration (#69855) --- homeassistant/components/overkiz/__init__.py | 2 +- homeassistant/components/overkiz/coordinator.py | 2 +- homeassistant/components/overkiz/entity.py | 8 +++++++- homeassistant/components/overkiz/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/overkiz/__init__.py b/homeassistant/components/overkiz/__init__.py index 66234eb4460..1132e269d04 100644 --- a/homeassistant/components/overkiz/__init__.py +++ b/homeassistant/components/overkiz/__init__.py @@ -123,7 +123,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: identifiers={(DOMAIN, gateway.id)}, model=gateway.sub_type.beautify_name if gateway.sub_type else None, manufacturer=server.manufacturer, - name=gateway.type.beautify_name, + name=gateway.type.beautify_name if gateway.type else gateway.id, sw_version=gateway.connectivity.protocol_version, configuration_url=server.configuration_url, ) diff --git a/homeassistant/components/overkiz/coordinator.py b/homeassistant/components/overkiz/coordinator.py index d90a52ae409..b27051b1492 100644 --- a/homeassistant/components/overkiz/coordinator.py +++ b/homeassistant/components/overkiz/coordinator.py @@ -62,7 +62,7 @@ class OverkizDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Device]]): device.protocol in (Protocol.RTS, Protocol.INTERNAL) for device in devices ) self.executions: dict[str, dict[str, str]] = {} - self.areas = self._places_to_area(places) + self.areas = self._places_to_area(places) if places else None self.config_entry_id = config_entry_id async def _async_update_data(self) -> dict[str, Device]: diff --git a/homeassistant/components/overkiz/entity.py b/homeassistant/components/overkiz/entity.py index 7c42f415a65..a177766c292 100644 --- a/homeassistant/components/overkiz/entity.py +++ b/homeassistant/components/overkiz/entity.py @@ -66,6 +66,12 @@ class OverkizEntity(CoordinatorEntity[OverkizDataUpdateCoordinator]): or self.device.widget.value ) + suggested_area = ( + self.coordinator.areas[self.device.place_oid] + if self.coordinator.areas and self.device.place_oid + else None + ) + return DeviceInfo( identifiers={(DOMAIN, self.executor.base_device_url)}, name=self.device.label, @@ -76,7 +82,7 @@ class OverkizEntity(CoordinatorEntity[OverkizDataUpdateCoordinator]): self.executor.select_attribute(OverkizAttribute.CORE_FIRMWARE_REVISION), ), hw_version=self.device.controllable_name, - suggested_area=self.coordinator.areas[self.device.place_oid], + suggested_area=suggested_area, via_device=(DOMAIN, self.executor.get_gateway_id()), configuration_url=self.coordinator.client.server.configuration_url, ) diff --git a/homeassistant/components/overkiz/manifest.json b/homeassistant/components/overkiz/manifest.json index 3409c06be26..c81de1e6139 100644 --- a/homeassistant/components/overkiz/manifest.json +++ b/homeassistant/components/overkiz/manifest.json @@ -3,7 +3,7 @@ "name": "Overkiz (by Somfy)", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/overkiz", - "requirements": ["pyoverkiz==1.3.14"], + "requirements": ["pyoverkiz==1.4.0"], "zeroconf": [ { "type": "_kizbox._tcp.local.", diff --git a/requirements_all.txt b/requirements_all.txt index 3e86626bc51..4e7606170fc 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1708,7 +1708,7 @@ pyotgw==1.1b1 pyotp==2.6.0 # homeassistant.components.overkiz -pyoverkiz==1.3.14 +pyoverkiz==1.4.0 # homeassistant.components.openweathermap pyowm==3.2.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 3a2da5cf07a..b397ccdc1e3 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1145,7 +1145,7 @@ pyotgw==1.1b1 pyotp==2.6.0 # homeassistant.components.overkiz -pyoverkiz==1.3.14 +pyoverkiz==1.4.0 # homeassistant.components.openweathermap pyowm==3.2.0