From 73ea9d36d384befdfae43b19ef5cc96f3857eee3 Mon Sep 17 00:00:00 2001 From: MikeEvans Date: Tue, 2 Jul 2024 12:46:49 +0100 Subject: [PATCH] Fix issue #93 - use of deprecated hass.helpers.aiohttp_client Apply fix described at https://developers.home-assistant.io/blog/2024/03/30/deprecate-hass-helpers/ --- custom_components/daikin_altherma/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/daikin_altherma/__init__.py b/custom_components/daikin_altherma/__init__.py index fb55cb4..929f03c 100755 --- a/custom_components/daikin_altherma/__init__.py +++ b/custom_components/daikin_altherma/__init__.py @@ -13,6 +13,7 @@ from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.update_coordinator import DataUpdateCoordinator +from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.util import Throttle from pyaltherma.comm import DaikinWSConnection from pyaltherma.controllers import AlthermaController @@ -26,7 +27,7 @@ async def setup_api_instance(hass, host): - session = hass.helpers.aiohttp_client.async_get_clientsession() + session = async_get_clientsession(hass) conn = DaikinWSConnection(session, host) device = AlthermaController(conn) await device.discover_units()