Skip to content

Commit

Permalink
Change async_timeout to asyncio.timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
astrandb committed Nov 16, 2024
1 parent 5b92ac2 commit a2947fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/weatherlink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from __future__ import annotations

import asyncio
from datetime import timedelta
from email.utils import mktime_tz, parsedate_tz
import logging

from aiohttp import ClientResponseError
import async_timeout

from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, Platform
Expand Down Expand Up @@ -525,7 +525,7 @@ def _preprocess(indata: str): # noqa: C901
async def async_fetch():
api = hass.data[DOMAIN][entry.entry_id]["api"]
try:
async with async_timeout.timeout(10):
async with asyncio.timeout(10):
res = await api.request("GET")
json_data = await res.json()
hass.data[DOMAIN][entry.entry_id]["current"] = json_data
Expand Down

0 comments on commit a2947fc

Please sign in to comment.