From ee867705706986b9ceb8a92dff7f67004bc9d637 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 29 Jan 2018 23:27:31 +0100 Subject: [PATCH] Fix API URL --- hassio/api/proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hassio/api/proxy.py b/hassio/api/proxy.py index f3ddf4b92..3cbc35cf5 100644 --- a/hassio/api/proxy.py +++ b/hassio/api/proxy.py @@ -100,7 +100,7 @@ class APIProxy(CoreSysAttributes): async def _websocket_client(self): """Initialize a websocket api connection.""" - url = f"{self.homeassistant.api_url}/api/websocket" + url = f"{self._homeassistant.api_url}/api/websocket" try: client = await self._websession_ssl.ws_connect( @@ -143,7 +143,7 @@ class APIProxy(CoreSysAttributes): 'type': 'auth_ok', 'ha_version': self._homeassistant.version, }) - except RuntimeError as err: + except (RuntimeError, ValueError) as err: _LOGGER.error("Can't initialize handshake: %s", err) raise HTTPInternalServerError() from None