mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 05:47:10 +00:00
Remove double timeout from gogogate2 (#42052)
This commit is contained in:
parent
6ab9b7355f
commit
c86dfeb6e2
@ -3,7 +3,6 @@ from datetime import timedelta
|
|||||||
import logging
|
import logging
|
||||||
from typing import Awaitable, Callable, NamedTuple, Optional
|
from typing import Awaitable, Callable, NamedTuple, Optional
|
||||||
|
|
||||||
import async_timeout
|
|
||||||
from gogogate2_api import AbstractGateApi, GogoGate2Api, ISmartGateApi
|
from gogogate2_api import AbstractGateApi, GogoGate2Api, ISmartGateApi
|
||||||
from gogogate2_api.common import AbstractDoor
|
from gogogate2_api.common import AbstractDoor
|
||||||
|
|
||||||
@ -71,8 +70,7 @@ def get_data_update_coordinator(
|
|||||||
|
|
||||||
async def async_update_data():
|
async def async_update_data():
|
||||||
try:
|
try:
|
||||||
async with async_timeout.timeout(3):
|
return await hass.async_add_executor_job(api.info)
|
||||||
return await hass.async_add_executor_job(api.info)
|
|
||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
raise UpdateFailed(
|
raise UpdateFailed(
|
||||||
f"Error communicating with API: {exception}"
|
f"Error communicating with API: {exception}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user