Bump wolf_smartset to 0.1.8 and handle server fetch error (#43351)

This commit is contained in:
Adam Król 2020-11-19 15:24:28 +01:00 committed by GitHub
parent 17e1a2a78a
commit edd25ae338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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"]
}

View File

@ -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

View File

@ -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