mirror of
https://github.com/home-assistant/core.git
synced 2025-07-07 21:37:07 +00:00
Attempt to fix occasional Flo timeouts (#82408)
* Attempt to fix occasional Flo timeouts * remove gather
This commit is contained in:
parent
a1d9d7116c
commit
adff01876a
@ -1,7 +1,6 @@
|
||||
"""Flo device object."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Any
|
||||
|
||||
@ -40,14 +39,10 @@ class FloDeviceDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
async def _async_update_data(self):
|
||||
"""Update data via library."""
|
||||
try:
|
||||
async with timeout(10):
|
||||
await asyncio.gather(
|
||||
*[
|
||||
self.send_presence_ping(),
|
||||
self._update_device(),
|
||||
self._update_consumption_data(),
|
||||
]
|
||||
)
|
||||
async with timeout(20):
|
||||
await self.send_presence_ping()
|
||||
await self._update_device()
|
||||
await self._update_consumption_data()
|
||||
except (RequestError) as error:
|
||||
raise UpdateFailed(error) from error
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user