Fix and bump apsystems-ez1 to 2.4.0 (#130740)

pull/131248/head
Patrick 2024-11-17 00:49:30 +01:00 committed by Franck Nijhof
parent 4863243f5a
commit 5deba1766e
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
5 changed files with 6 additions and 4 deletions

View File

@ -38,6 +38,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ApSystemsConfigEntry) ->
ip_address=entry.data[CONF_IP_ADDRESS],
port=entry.data.get(CONF_PORT, DEFAULT_PORT),
timeout=8,
enable_debounce=True,
)
coordinator = ApSystemsDataCoordinator(hass, api)
await coordinator.async_config_entry_first_refresh()

View File

@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/apsystems",
"integration_type": "device",
"iot_class": "local_polling",
"requirements": ["apsystems-ez1==2.2.1"]
"requirements": ["apsystems-ez1==2.4.0"]
}

View File

@ -5,6 +5,7 @@ from __future__ import annotations
from typing import Any
from aiohttp.client_exceptions import ClientConnectionError
from APsystemsEZ1 import InverterReturnedError
from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity
from homeassistant.core import HomeAssistant
@ -40,7 +41,7 @@ class ApSystemsInverterSwitch(ApSystemsEntity, SwitchEntity):
"""Update switch status and availability."""
try:
status = await self._api.get_device_power_status()
except (TimeoutError, ClientConnectionError):
except (TimeoutError, ClientConnectionError, InverterReturnedError):
self._attr_available = False
else:
self._attr_available = True

View File

@ -474,7 +474,7 @@ apprise==1.9.0
aprslib==0.7.2
# homeassistant.components.apsystems
apsystems-ez1==2.2.1
apsystems-ez1==2.4.0
# homeassistant.components.aqualogic
aqualogic==2.6

View File

@ -447,7 +447,7 @@ apprise==1.9.0
aprslib==0.7.2
# homeassistant.components.apsystems
apsystems-ez1==2.2.1
apsystems-ez1==2.4.0
# homeassistant.components.aranet
aranet4==2.4.0