1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Update pyheos to 0.6.0 (#26191)

This commit is contained in:
Andrew Sayre
2019-08-25 13:57:43 -05:00
committed by Pascal Vizeli
parent d4bd5a180c
commit 7bfb365f62
11 changed files with 66 additions and 92 deletions

View File

@@ -1,7 +1,5 @@
"""Config flow to configure Heos."""
import asyncio
from pyheos import Heos
from pyheos import Heos, HeosError
import voluptuous as vol
from homeassistant import config_entries
@@ -59,7 +57,7 @@ class HeosFlowHandler(config_entries.ConfigFlow):
await heos.connect()
self.hass.data.pop(DATA_DISCOVERED_HOSTS)
return await self.async_step_import({CONF_HOST: host})
except (asyncio.TimeoutError, ConnectionError):
except HeosError:
errors[CONF_HOST] = "connection_failure"
finally:
await heos.disconnect()