Skip to content

Commit

Permalink
Merge pull request #106 from golles/remove-async_timeout
Browse files Browse the repository at this point in the history
Remove async-timeout as dependency
  • Loading branch information
golles authored Dec 11, 2023
2 parents c7b669a + b5ed3dd commit 580c42f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/knmi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import socket

import aiohttp
import async_timeout

from .const import API_ENDPOINT, API_TIMEOUT

Expand Down Expand Up @@ -48,7 +47,7 @@ async def async_get_data(self) -> dict:
async def api_wrapper(self, method: str, url: str) -> dict:
"""Get information from the API."""
try:
async with async_timeout.timeout(API_TIMEOUT):
async with asyncio.timeout(API_TIMEOUT):
if method == "get":
response = await self._session.get(url)
response_text = await response.text()
Expand Down

0 comments on commit 580c42f

Please sign in to comment.