From edd25ae338f312622347353340930161cfc51668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Kr=C3=B3l?= Date: Thu, 19 Nov 2020 15:24:28 +0100 Subject: [PATCH] Bump wolf_smartset to 0.1.8 and handle server fetch error (#43351) --- homeassistant/components/wolflink/__init__.py | 6 +++++- homeassistant/components/wolflink/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/wolflink/__init__.py b/homeassistant/components/wolflink/__init__.py index 611fa7da315..d04cd7a56d4 100644 --- a/homeassistant/components/wolflink/__init__.py +++ b/homeassistant/components/wolflink/__init__.py @@ -4,7 +4,7 @@ import logging from httpcore import ConnectError, ConnectTimeout from wolf_smartset.token_auth import InvalidAuth -from wolf_smartset.wolf_client import WolfClient +from wolf_smartset.wolf_client import FetchFailed, WolfClient from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_PASSWORD, CONF_USERNAME @@ -56,6 +56,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): raise UpdateFailed( f"Error communicating with API: {exception}" ) from exception + except FetchFailed as exception: + raise UpdateFailed( + f"Could not fetch values from server due to: {exception}" + ) from exception except InvalidAuth as exception: raise UpdateFailed("Invalid authentication during update.") from exception diff --git a/homeassistant/components/wolflink/manifest.json b/homeassistant/components/wolflink/manifest.json index 633318f2f62..6d038d4fb29 100644 --- a/homeassistant/components/wolflink/manifest.json +++ b/homeassistant/components/wolflink/manifest.json @@ -3,6 +3,6 @@ "name": "Wolf SmartSet Service", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/wolflink", - "requirements": ["wolf_smartset==0.1.6"], + "requirements": ["wolf_smartset==0.1.8"], "codeowners": ["@adamkrol93"] } diff --git a/requirements_all.txt b/requirements_all.txt index 9481f2517cb..d93b391e7f9 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2286,7 +2286,7 @@ withings-api==2.1.6 wled==0.4.4 # homeassistant.components.wolflink -wolf_smartset==0.1.6 +wolf_smartset==0.1.8 # homeassistant.components.xbee xbee-helper==0.0.7 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index a748d6cb705..f3229b536eb 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1100,7 +1100,7 @@ withings-api==2.1.6 wled==0.4.4 # homeassistant.components.wolflink -wolf_smartset==0.1.6 +wolf_smartset==0.1.8 # homeassistant.components.xbox xbox-webapi==2.0.8