From 8a8f1aff83ecaac120373c0cbc6cd5c41933f0a3 Mon Sep 17 00:00:00 2001 From: Guido Schmitz Date: Thu, 14 Sep 2023 12:35:21 +0200 Subject: [PATCH] Remove useless timeout guards in devolo_home_network (#100364) --- .../devolo_home_network/__init__.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/homeassistant/components/devolo_home_network/__init__.py b/homeassistant/components/devolo_home_network/__init__.py index 627a121dcb4..d76a6163516 100644 --- a/homeassistant/components/devolo_home_network/__init__.py +++ b/homeassistant/components/devolo_home_network/__init__.py @@ -1,7 +1,6 @@ """The devolo Home Network integration.""" from __future__ import annotations -import asyncio import logging from typing import Any @@ -74,8 +73,7 @@ async def async_setup_entry( # noqa: C901 """Fetch data from API endpoint.""" assert device.device try: - async with asyncio.timeout(30): - return await device.device.async_check_firmware_available() + return await device.device.async_check_firmware_available() except DeviceUnavailable as err: raise UpdateFailed(err) from err @@ -83,8 +81,7 @@ async def async_setup_entry( # noqa: C901 """Fetch data from API endpoint.""" assert device.plcnet try: - async with asyncio.timeout(10): - return await device.plcnet.async_get_network_overview() + return await device.plcnet.async_get_network_overview() except DeviceUnavailable as err: raise UpdateFailed(err) from err @@ -92,8 +89,7 @@ async def async_setup_entry( # noqa: C901 """Fetch data from API endpoint.""" assert device.device try: - async with asyncio.timeout(10): - return await device.device.async_get_wifi_guest_access() + return await device.device.async_get_wifi_guest_access() except DeviceUnavailable as err: raise UpdateFailed(err) from err except DevicePasswordProtected as err: @@ -103,8 +99,7 @@ async def async_setup_entry( # noqa: C901 """Fetch data from API endpoint.""" assert device.device try: - async with asyncio.timeout(10): - return await device.device.async_get_led_setting() + return await device.device.async_get_led_setting() except DeviceUnavailable as err: raise UpdateFailed(err) from err @@ -112,8 +107,7 @@ async def async_setup_entry( # noqa: C901 """Fetch data from API endpoint.""" assert device.device try: - async with asyncio.timeout(10): - return await device.device.async_get_wifi_connected_station() + return await device.device.async_get_wifi_connected_station() except DeviceUnavailable as err: raise UpdateFailed(err) from err @@ -121,8 +115,7 @@ async def async_setup_entry( # noqa: C901 """Fetch data from API endpoint.""" assert device.device try: - async with asyncio.timeout(30): - return await device.device.async_get_wifi_neighbor_access_points() + return await device.device.async_get_wifi_neighbor_access_points() except DeviceUnavailable as err: raise UpdateFailed(err) from err