From 096f6eb5545a4fc37c27e99e6e0ea1532c469e60 Mon Sep 17 00:00:00 2001 From: shbatm Date: Tue, 7 Feb 2023 13:03:27 -0600 Subject: [PATCH] Bump PyISY to 3.1.13, check portal for network buttons (#87650) --- homeassistant/components/isy994/__init__.py | 8 +++++--- homeassistant/components/isy994/const.py | 1 - homeassistant/components/isy994/manifest.json | 2 +- homeassistant/components/isy994/services.py | 4 ++-- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/isy994/__init__.py b/homeassistant/components/isy994/__init__.py index c9e4f6ed16e..3612e87f8e6 100644 --- a/homeassistant/components/isy994/__init__.py +++ b/homeassistant/components/isy994/__init__.py @@ -7,6 +7,7 @@ from urllib.parse import urlparse from aiohttp import CookieJar import async_timeout from pyisy import ISY, ISYConnectionError, ISYInvalidAuthError, ISYResponseParseError +from pyisy.constants import CONFIG_NETWORKING, CONFIG_PORTAL import voluptuous as vol from homeassistant import config_entries @@ -43,7 +44,6 @@ from .const import ( ISY_CONF_FIRMWARE, ISY_CONF_MODEL, ISY_CONF_NAME, - ISY_CONF_NETWORKING, MANUFACTURER, PLATFORMS, SCHEME_HTTP, @@ -220,9 +220,11 @@ async def async_setup_entry( numbers = isy_data.variables[Platform.NUMBER] for vtype, _, vid in isy.variables.children: numbers.append(isy.variables[vtype][vid]) - if isy.conf[ISY_CONF_NETWORKING]: + if ( + isy.conf[CONFIG_NETWORKING] or isy.conf[CONFIG_PORTAL] + ) and isy.networking.nobjs: isy_data.devices[CONF_NETWORK] = _create_service_device_info( - isy, name=ISY_CONF_NETWORKING, unique_id=CONF_NETWORK + isy, name=CONFIG_NETWORKING, unique_id=CONF_NETWORK ) for resource in isy.networking.nobjs: isy_data.net_resources.append(resource) diff --git a/homeassistant/components/isy994/const.py b/homeassistant/components/isy994/const.py index 95e68c5fa11..37ae1a82b91 100644 --- a/homeassistant/components/isy994/const.py +++ b/homeassistant/components/isy994/const.py @@ -118,7 +118,6 @@ SUPPORTED_BIN_SENS_CLASSES = ["moisture", "opening", "motion", "climate"] # (they can turn off, and report their state) ISY_GROUP_PLATFORM = Platform.SWITCH -ISY_CONF_NETWORKING = "Networking Module" ISY_CONF_UUID = "uuid" ISY_CONF_NAME = "name" ISY_CONF_MODEL = "model" diff --git a/homeassistant/components/isy994/manifest.json b/homeassistant/components/isy994/manifest.json index 8fa77cd126c..b24167e0c78 100644 --- a/homeassistant/components/isy994/manifest.json +++ b/homeassistant/components/isy994/manifest.json @@ -3,7 +3,7 @@ "name": "Universal Devices ISY/IoX", "integration_type": "hub", "documentation": "https://www.home-assistant.io/integrations/isy994", - "requirements": ["pyisy==3.1.11"], + "requirements": ["pyisy==3.1.13"], "codeowners": ["@bdraco", "@shbatm"], "config_flow": true, "ssdp": [ diff --git a/homeassistant/components/isy994/services.py b/homeassistant/components/isy994/services.py index 759ebfbde0e..05e0425c3f5 100644 --- a/homeassistant/components/isy994/services.py +++ b/homeassistant/components/isy994/services.py @@ -23,7 +23,7 @@ import homeassistant.helpers.entity_registry as er from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue from homeassistant.helpers.service import entity_service_call -from .const import _LOGGER, CONF_NETWORK, DOMAIN, ISY_CONF_NAME, ISY_CONF_NETWORKING +from .const import _LOGGER, CONF_NETWORK, DOMAIN, ISY_CONF_NAME from .util import _async_cleanup_registry_entries # Common Services for All Platforms: @@ -233,7 +233,7 @@ def async_setup_services(hass: HomeAssistant) -> None: # noqa: C901 isy = isy_data.root if isy_name and isy_name != isy.conf[ISY_CONF_NAME]: continue - if isy.networking is None or not isy.conf[ISY_CONF_NETWORKING]: + if isy.networking is None: continue command = None if address: diff --git a/requirements_all.txt b/requirements_all.txt index 7b8d9edf786..a21dc40911f 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1705,7 +1705,7 @@ pyirishrail==0.0.2 pyiss==1.0.1 # homeassistant.components.isy994 -pyisy==3.1.11 +pyisy==3.1.13 # homeassistant.components.itach pyitachip2ir==0.0.7 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index eb019566e90..0bfaafc8c84 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1224,7 +1224,7 @@ pyiqvia==2022.04.0 pyiss==1.0.1 # homeassistant.components.isy994 -pyisy==3.1.11 +pyisy==3.1.13 # homeassistant.components.kaleidescape pykaleidescape==1.0.1