Use shared httpx client in iaqualink integration (#121407)
This commit is contained in:
parent
44f989ae38
commit
5ea1601c2c
1 changed files with 2 additions and 1 deletions
|
@ -36,6 +36,7 @@ from homeassistant.helpers.dispatcher import (
|
||||||
)
|
)
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.helpers.event import async_track_time_interval
|
from homeassistant.helpers.event import async_track_time_interval
|
||||||
|
from homeassistant.helpers.httpx_client import get_async_client
|
||||||
|
|
||||||
from .const import DOMAIN, UPDATE_INTERVAL
|
from .const import DOMAIN, UPDATE_INTERVAL
|
||||||
|
|
||||||
|
@ -67,7 +68,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
sensors = hass.data[DOMAIN][SENSOR_DOMAIN] = []
|
sensors = hass.data[DOMAIN][SENSOR_DOMAIN] = []
|
||||||
switches = hass.data[DOMAIN][SWITCH_DOMAIN] = []
|
switches = hass.data[DOMAIN][SWITCH_DOMAIN] = []
|
||||||
|
|
||||||
aqualink = AqualinkClient(username, password)
|
aqualink = AqualinkClient(username, password, httpx_client=get_async_client(hass))
|
||||||
try:
|
try:
|
||||||
await aqualink.login()
|
await aqualink.login()
|
||||||
except AqualinkServiceException as login_exception:
|
except AqualinkServiceException as login_exception:
|
||||||
|
|
Loading…
Add table
Reference in a new issue