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

Use asyncio.timeout [b-e] (#98448)

This commit is contained in:
Marc Mueller
2023-08-15 15:30:20 +02:00
committed by GitHub
parent 346a7292d7
commit e2d2ec8817
26 changed files with 53 additions and 71 deletions

View File

@@ -1,6 +1,7 @@
"""esphome session fixtures."""
from __future__ import annotations
import asyncio
from asyncio import Event
from collections.abc import Awaitable, Callable
from typing import Any
@@ -15,7 +16,6 @@ from aioesphomeapi import (
ReconnectLogic,
UserService,
)
import async_timeout
import pytest
from zeroconf import Zeroconf
@@ -252,7 +252,7 @@ async def _mock_generic_device_entry(
"homeassistant.components.esphome.manager.ReconnectLogic", MockReconnectLogic
):
assert await hass.config_entries.async_setup(entry.entry_id)
async with async_timeout.timeout(2):
async with asyncio.timeout(2):
await try_connect_done.wait()
await hass.async_block_till_done()