Reduce the amount of data fetched in individual Hydrawise API calls (#120328)
This commit is contained in:
parent
46dcf1dc44
commit
3b79ab6e18
4 changed files with 11 additions and 10 deletions
|
@ -37,8 +37,8 @@ class HydrawiseConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
# Verify that the provided credentials work."""
|
||||
api = client.Hydrawise(auth.Auth(username, password))
|
||||
try:
|
||||
# Skip fetching zones to save on metered API calls.
|
||||
user = await api.get_user()
|
||||
# Don't fetch zones because we don't need them yet.
|
||||
user = await api.get_user(fetch_zones=False)
|
||||
except NotAuthorizedError:
|
||||
return on_failure("invalid_auth")
|
||||
except TimeoutError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue