Fix hassio with python3.11 (#92178)

This commit is contained in:
J. Nick Koston 2023-04-28 15:38:32 +02:00 committed by GitHub
parent c3d3bc4b74
commit 2bfa521068
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -30,7 +30,11 @@ async def async_setup_addon_panel(hass: HomeAssistant, hassio):
for addon, data in panels.items():
if not data[ATTR_ENABLE]:
continue
jobs.append(_register_panel(hass, addon, data))
jobs.append(
asyncio.create_task(
_register_panel(hass, addon, data), name=f"register panel {addon}"
)
)
if jobs:
await asyncio.wait(jobs)

View File

@ -119,8 +119,8 @@ class HassIOIngress(HomeAssistantView):
# Proxy requests
await asyncio.wait(
[
_websocket_forward(ws_server, ws_client),
_websocket_forward(ws_client, ws_server),
asyncio.create_task(_websocket_forward(ws_server, ws_client)),
asyncio.create_task(_websocket_forward(ws_client, ws_server)),
],
return_when=asyncio.FIRST_COMPLETED,
)