1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-25 04:46:25 +00:00

Fix API URL

This commit is contained in:
Pascal Vizeli
2018-01-29 23:27:31 +01:00
committed by GitHub
parent 385a4e9f6f
commit ee86770570

View File

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