mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 05:47:10 +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."""
|
"""Flo device object."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@ -40,14 +39,10 @@ class FloDeviceDataUpdateCoordinator(DataUpdateCoordinator):
|
|||||||
async def _async_update_data(self):
|
async def _async_update_data(self):
|
||||||
"""Update data via library."""
|
"""Update data via library."""
|
||||||
try:
|
try:
|
||||||
async with timeout(10):
|
async with timeout(20):
|
||||||
await asyncio.gather(
|
await self.send_presence_ping()
|
||||||
*[
|
await self._update_device()
|
||||||
self.send_presence_ping(),
|
await self._update_consumption_data()
|
||||||
self._update_device(),
|
|
||||||
self._update_consumption_data(),
|
|
||||||
]
|
|
||||||
)
|
|
||||||
except (RequestError) as error:
|
except (RequestError) as error:
|
||||||
raise UpdateFailed(error) from error
|
raise UpdateFailed(error) from error
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user