mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 01:07:10 +00:00
Reduce number of parallel api calls to august (#66328)
This commit is contained in:
parent
acf2033734
commit
323af9f59c
@ -107,11 +107,10 @@ class AugustData(AugustSubscriberMixin):
|
||||
async def async_setup(self):
|
||||
"""Async setup of august device data and activities."""
|
||||
token = self._august_gateway.access_token
|
||||
user_data, locks, doorbells = await asyncio.gather(
|
||||
self._api.async_get_user(token),
|
||||
self._api.async_get_operable_locks(token),
|
||||
self._api.async_get_doorbells(token),
|
||||
)
|
||||
# This used to be a gather but it was less reliable with august's recent api changes.
|
||||
user_data = await self._api.async_get_user(token)
|
||||
locks = await self._api.async_get_operable_locks(token)
|
||||
doorbells = await self._api.async_get_doorbells(token)
|
||||
if not doorbells:
|
||||
doorbells = []
|
||||
if not locks:
|
||||
|
Loading…
x
Reference in New Issue
Block a user