Skip to content

Commit

Permalink
Reduce number of parallel api calls to august (home-assistant#66328)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Feb 11, 2022
1 parent acf2033 commit 323af9f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions homeassistant/components/august/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,10 @@ def __init__(self, hass, august_gateway):
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:
Expand Down

0 comments on commit 323af9f

Please sign in to comment.