Attempt to fix occasional Flo timeouts (#82408)

* Attempt to fix occasional Flo timeouts

* remove gather
This commit is contained in:
David F. Mulcahey 2022-11-20 10:39:47 -05:00 committed by GitHub
parent a1d9d7116c
commit adff01876a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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