Skip to content

Commit

Permalink
Move to asyncio.timeout from async_timeout
Browse files Browse the repository at this point in the history
New minimum requirement HA 2023.8 and Python 3.11
  • Loading branch information
WillCodeForCats committed Jul 30, 2023
1 parent 2c2b16f commit b38f174
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions custom_components/solaredge_modbus_multi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SolarEdge Modbus Multi",
"content_in_root": false,
"homeassistant": "2023.7.0",
"homeassistant": "2023.8.0",
"render_readme": false
}
2 changes: 1 addition & 1 deletion info.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit b38f174

Please sign in to comment.