diff --git a/homeassistant/components/homewizard/coordinator.py b/homeassistant/components/homewizard/coordinator.py index a2612d07464..2cce88cbe36 100644 --- a/homeassistant/components/homewizard/coordinator.py +++ b/homeassistant/components/homewizard/coordinator.py @@ -8,6 +8,7 @@ import aiohwenergy import async_timeout from homeassistant.core import HomeAssistant +from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from .const import DOMAIN, UPDATE_INTERVAL, DeviceResponseEntry @@ -28,7 +29,9 @@ class HWEnergyDeviceUpdateCoordinator(DataUpdateCoordinator[DeviceResponseEntry] """Initialize Update Coordinator.""" super().__init__(hass, _LOGGER, name=DOMAIN, update_interval=UPDATE_INTERVAL) - self.api = aiohwenergy.HomeWizardEnergy(host) + + session = async_get_clientsession(hass) + self.api = aiohwenergy.HomeWizardEnergy(host, clientsession=session) async def _async_update_data(self) -> DeviceResponseEntry: """Fetch all device and sensor data from api.""" diff --git a/homeassistant/components/homewizard/manifest.json b/homeassistant/components/homewizard/manifest.json index 641bfca520e..0fe2174da83 100644 --- a/homeassistant/components/homewizard/manifest.json +++ b/homeassistant/components/homewizard/manifest.json @@ -5,7 +5,7 @@ "codeowners": ["@DCSBL"], "dependencies": [], "requirements": [ - "aiohwenergy==0.7.0" + "aiohwenergy==0.8.0" ], "zeroconf": ["_hwenergy._tcp.local."], "config_flow": true, diff --git a/requirements_all.txt b/requirements_all.txt index 5005932b5c5..48788881cb3 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -194,7 +194,7 @@ aiohttp_cors==0.7.0 aiohue==3.0.11 # homeassistant.components.homewizard -aiohwenergy==0.7.0 +aiohwenergy==0.8.0 # homeassistant.components.imap aioimaplib==0.9.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 41a42584561..21966b1721e 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -144,7 +144,7 @@ aiohttp_cors==0.7.0 aiohue==3.0.11 # homeassistant.components.homewizard -aiohwenergy==0.7.0 +aiohwenergy==0.8.0 # homeassistant.components.apache_kafka aiokafka==0.6.0