Use asyncio.timeout [i-n] (#98450)

This commit is contained in:
Marc Mueller 2023-08-15 14:32:15 +02:00 committed by GitHub
parent 35b914af97
commit 71d985e4d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 78 additions and 111 deletions

View file

@ -4,8 +4,6 @@ import asyncio
from contextlib import suppress
import logging
from async_timeout import timeout
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import config_entry_flow
from homeassistant.helpers.dispatcher import async_dispatcher_connect
@ -28,7 +26,7 @@ async def _async_has_devices(hass: HomeAssistant) -> bool:
disco = await async_start_discovery_service(hass)
with suppress(asyncio.TimeoutError):
async with timeout(TIMEOUT_DISCOVERY):
async with asyncio.timeout(TIMEOUT_DISCOVERY):
await controller_ready.wait()
if not disco.pi_disco.controllers: