From b38f174c4863369392712957835ab13122bb94ff Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Sat, 29 Jul 2023 22:45:46 -0700 Subject: [PATCH 1/2] Move to asyncio.timeout from async_timeout New minimum requirement HA 2023.8 and Python 3.11 --- README.md | 2 +- custom_components/solaredge_modbus_multi/__init__.py | 3 +-- hacs.json | 2 +- info.md | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2e7442da..7edef84a 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ After rebooting Home Assistant, this integration can be configured through the i ### Required Versions * Home Assistant 2023.7.0 or newer -* Python 3.10 or newer +* Python 3.11 or newer * pymodbus 3.3.1 or newer ## Specifications diff --git a/custom_components/solaredge_modbus_multi/__init__.py b/custom_components/solaredge_modbus_multi/__init__.py index e46531a3..ec50f182 100644 --- a/custom_components/solaredge_modbus_multi/__init__.py +++ b/custom_components/solaredge_modbus_multi/__init__.py @@ -6,7 +6,6 @@ from datetime import timedelta from typing import Any -import async_timeout from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( CONF_HOST, @@ -220,7 +219,7 @@ async def _refresh_modbus_data_with_retry( attempt = 1 while True: try: - async with async_timeout.timeout(self._hub.coordinator_timeout): + async with asyncio.timeout(self._hub.coordinator_timeout): return await self._hub.async_refresh_modbus_data() except Exception as ex: if not isinstance(ex, ex_type): diff --git a/hacs.json b/hacs.json index 416d38b6..dc500deb 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { "name": "SolarEdge Modbus Multi", "content_in_root": false, - "homeassistant": "2023.7.0", + "homeassistant": "2023.8.0", "render_readme": false } diff --git a/info.md b/info.md index 7af484c2..07e3fe0a 100644 --- a/info.md +++ b/info.md @@ -22,4 +22,4 @@ Read more on the wiki: [WillCodeForCats/solaredge-modbus-multi/wiki](https://git * Supports status and error reporting sensors. * User friendly configuration through Config Flow. -Requires Home Assistant 2023.7.0 and newer. +Requires Home Assistant 2023.8.0 and newer. From 165019cc5ae3ac1868c4a7d1ff7fb9d4bad46fb8 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Sat, 29 Jul 2023 22:47:28 -0700 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7edef84a..d4207cc5 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ After rebooting Home Assistant, this integration can be configured through the i [WillCodeForCats/solaredge-modbus-multi/wiki](https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki) ### Required Versions -* Home Assistant 2023.7.0 or newer +* Home Assistant 2023.8.0 or newer * Python 3.11 or newer * pymodbus 3.3.1 or newer