diff --git a/custom_components/miwifi/config_flow.py b/custom_components/miwifi/config_flow.py index befdaca..5d3b25c 100644 --- a/custom_components/miwifi/config_flow.py +++ b/custom_components/miwifi/config_flow.py @@ -10,7 +10,7 @@ CONF_SCAN_INTERVAL, CONF_TIMEOUT ) -from homeassistant.helpers.aiohttp_client import async_get_clientsession +from homeassistant.helpers.httpx_client import get_async_client from .core.const import ( DOMAIN, @@ -45,9 +45,7 @@ async def async_step_auth(self, user_input): if user_input is None: return self.cur_step - session = async_get_clientsession(self.hass, False) - - client = Luci(self.hass, session, user_input[CONF_IP_ADDRESS], user_input[CONF_PASSWORD]) + client = Luci(self.hass, get_async_client(self.hass, False), user_input[CONF_IP_ADDRESS], user_input[CONF_PASSWORD]) try: await client.login() @@ -109,9 +107,7 @@ async def async_step_settings(self, user_input = None): }) if user_input: - session = async_get_clientsession(self.hass, False) - - client = Luci(self.hass, session, user_input[CONF_IP_ADDRESS], user_input[CONF_PASSWORD]) + client = Luci(self.hass, get_async_client(self.hass, False), user_input[CONF_IP_ADDRESS], user_input[CONF_PASSWORD]) try: await client.login() diff --git a/custom_components/miwifi/manifest.json b/custom_components/miwifi/manifest.json index 6c23938..b56b2cd 100644 --- a/custom_components/miwifi/manifest.json +++ b/custom_components/miwifi/manifest.json @@ -1,7 +1,7 @@ { "domain": "miwifi", "name": "MiWiFi", - "version": "1.3.0", + "version": "1.3.1", "documentation": "https://github.com/dmamontov/hass-miwifi", "issue_tracker": "https://github.com/dmamontov/hass-miwifi/issues", "config_flow": true,