mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-23 00:56:29 +00:00
Fix version conflicts
This commit is contained in:
commit
f14eef62ae
@ -4,7 +4,7 @@ import logging
|
|||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
from aiohttp.web_exceptions import HTTPBadGateway
|
from aiohttp.web_exceptions import HTTPBadGateway, HTTPInternalServerError
|
||||||
from aiohttp.hdrs import CONTENT_TYPE
|
from aiohttp.hdrs import CONTENT_TYPE
|
||||||
import async_timeout
|
import async_timeout
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class APIProxy(CoreSysAttributes):
|
|||||||
|
|
||||||
async def _websocket_client(self):
|
async def _websocket_client(self):
|
||||||
"""Initialize a websocket api connection."""
|
"""Initialize a websocket api connection."""
|
||||||
url = f"{self.homeassistant.api_url}/api/websocket"
|
url = f"{self._homeassistant.api_url}/api/websocket"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = await self._websession_ssl.ws_connect(
|
client = await self._websession_ssl.ws_connect(
|
||||||
@ -133,9 +133,19 @@ class APIProxy(CoreSysAttributes):
|
|||||||
await server.prepare(request)
|
await server.prepare(request)
|
||||||
|
|
||||||
# handle authentication
|
# handle authentication
|
||||||
await server.send_json({'type': 'auth_required'})
|
try:
|
||||||
await server.receive_json() # get internal token
|
await server.send_json({
|
||||||
await server.send_json({'type': 'auth_ok'})
|
'type': 'auth_required',
|
||||||
|
'ha_version': self._homeassistant.version,
|
||||||
|
})
|
||||||
|
await server.receive_json() # get internal token
|
||||||
|
await server.send_json({
|
||||||
|
'type': 'auth_ok',
|
||||||
|
'ha_version': self._homeassistant.version,
|
||||||
|
})
|
||||||
|
except (RuntimeError, ValueError) as err:
|
||||||
|
_LOGGER.error("Can't initialize handshake: %s", err)
|
||||||
|
raise HTTPInternalServerError() from None
|
||||||
|
|
||||||
# init connection to hass
|
# init connection to hass
|
||||||
client = await self._websocket_client()
|
client = await self._websocket_client()
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from ipaddress import ip_network
|
from ipaddress import ip_network
|
||||||
|
|
||||||
HASSIO_VERSION = '0.84'
|
HASSIO_VERSION = '0.85'
|
||||||
|
|
||||||
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
|
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
|
||||||
'hassio/{}/version.json')
|
'hassio/{}/version.json')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"hassio": "0.84",
|
"hassio": "0.85",
|
||||||
"homeassistant": "0.62.0",
|
"homeassistant": "0.62.0",
|
||||||
"resinos": "1.1",
|
"resinos": "1.1",
|
||||||
"resinhup": "0.3",
|
"resinhup": "0.3",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user