mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
iaqualink: fix load_verify_locations() blocking call (#133459)
* Try to fix blocking call * Fix lint
This commit is contained in:
parent
3788e942a7
commit
9c70ec4150
@ -14,6 +14,7 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
||||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||||
|
from homeassistant.helpers.httpx_client import get_async_client
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
@ -34,7 +35,9 @@ class AqualinkFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
password = user_input[CONF_PASSWORD]
|
password = user_input[CONF_PASSWORD]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with AqualinkClient(username, password):
|
async with AqualinkClient(
|
||||||
|
username, password, httpx_client=get_async_client(self.hass)
|
||||||
|
):
|
||||||
pass
|
pass
|
||||||
except AqualinkServiceUnauthorizedException:
|
except AqualinkServiceUnauthorizedException:
|
||||||
errors["base"] = "invalid_auth"
|
errors["base"] = "invalid_auth"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user