iaqualink: fix load_verify_locations() blocking call (#133459)

* Try to fix blocking call

* Fix lint
This commit is contained in:
Florent Thoumie 2024-12-21 00:26:38 -08:00 committed by GitHub
parent 3788e942a7
commit 9c70ec4150
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,6 +14,7 @@ import voluptuous as vol
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.helpers.httpx_client import get_async_client
from .const import DOMAIN
@ -34,7 +35,9 @@ class AqualinkFlowHandler(ConfigFlow, domain=DOMAIN):
password = user_input[CONF_PASSWORD]
try:
async with AqualinkClient(username, password):
async with AqualinkClient(
username, password, httpx_client=get_async_client(self.hass)
):
pass
except AqualinkServiceUnauthorizedException:
errors["base"] = "invalid_auth"