We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cc84c2 commit 612d0edCopy full SHA for 612d0ed
switchbot/devices/lock.py
@@ -92,7 +92,12 @@ async def api_request(
92
headers: dict = None,
93
) -> dict:
94
url = f"https://{subdomain}.{SWITCHBOT_APP_API_BASE_URL}/{path}"
95
- async with session.post(url, json=data, headers=headers) as result:
+ async with session.post(
96
+ url,
97
+ json=data,
98
+ headers=headers,
99
+ timeout=aiohttp.ClientTimeout(total=10),
100
+ ) as result:
101
if result.status > 299:
102
raise SwitchbotApiError(
103
f"Unexpected status code returned by SwitchBot API: {result.status}"
0 commit comments