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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 53 additions and 71 deletions

View file

@ -1,11 +1,11 @@
"""Elmax integration common classes and utilities."""
from __future__ import annotations
import asyncio
from datetime import timedelta
import logging
from logging import Logger
import async_timeout
from elmax_api.exceptions import (
ElmaxApiError,
ElmaxBadLoginError,
@ -94,7 +94,7 @@ class ElmaxCoordinator(DataUpdateCoordinator[PanelStatus]):
async def _async_update_data(self):
try:
async with async_timeout.timeout(DEFAULT_TIMEOUT):
async with asyncio.timeout(DEFAULT_TIMEOUT):
# Retrieve the panel online status first
panels = await self._client.list_control_panels()
panel = next(