Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change async_timeout to asyncio.timeout #210

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading