Reduce the amount of data fetched in individual Hydrawise API calls (#120328)

This commit is contained in:
David Knowles 2024-06-24 14:58:54 -04:00 committed by GitHub
parent 46dcf1dc44
commit 3b79ab6e18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 10 deletions

View file

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