nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 31 lines 1.2 kB view raw
1From 06a6b3ff1ae181f9972b47838569d658ba4b3d9c Mon Sep 17 00:00:00 2001 2From: Martin Weinelt <hexa@darmstadt.ccc.de> 3Date: Sat, 4 Oct 2025 14:45:02 +0200 4Subject: [PATCH] Use the python native asyncio timeout function 5 6instead of depending on the undeclared async-timeout package. 7--- 8 custom_components/local_luftdaten/sensor.py | 3 +-- 9 1 file changed, 1 insertion(+), 2 deletions(-) 10 11diff --git a/custom_components/local_luftdaten/sensor.py b/custom_components/local_luftdaten/sensor.py 12index 4f4f5b4..82ea041 100644 13--- a/custom_components/local_luftdaten/sensor.py 14+++ b/custom_components/local_luftdaten/sensor.py 15@@ -12,7 +12,6 @@ 16 import asyncio 17 from typing import Optional 18 import aiohttp 19-import async_timeout 20 import datetime 21 22 import json 23@@ -170,7 +169,7 @@ async def async_update(self): 24 responseData = None 25 try: 26 _LOGGER.debug("Get data from %s", str(self._resource)) 27- with async_timeout.timeout(30): 28+ async with asyncio.timeout(30): 29 response = await self._session.get(self._resource) 30 responseData = await response.text() 31 _LOGGER.debug("Received data: %s", str(self.data))