mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Fix and bump apsystems-ez1 to 2.4.0 (#130740)
This commit is contained in:
parent
9711816542
commit
fece83d882
@ -38,6 +38,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ApSystemsConfigEntry) ->
|
|||||||
ip_address=entry.data[CONF_IP_ADDRESS],
|
ip_address=entry.data[CONF_IP_ADDRESS],
|
||||||
port=entry.data.get(CONF_PORT, DEFAULT_PORT),
|
port=entry.data.get(CONF_PORT, DEFAULT_PORT),
|
||||||
timeout=8,
|
timeout=8,
|
||||||
|
enable_debounce=True,
|
||||||
)
|
)
|
||||||
coordinator = ApSystemsDataCoordinator(hass, api)
|
coordinator = ApSystemsDataCoordinator(hass, api)
|
||||||
await coordinator.async_config_entry_first_refresh()
|
await coordinator.async_config_entry_first_refresh()
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/apsystems",
|
"documentation": "https://www.home-assistant.io/integrations/apsystems",
|
||||||
"integration_type": "device",
|
"integration_type": "device",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"requirements": ["apsystems-ez1==2.2.1"]
|
"requirements": ["apsystems-ez1==2.4.0"]
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ from __future__ import annotations
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from aiohttp.client_exceptions import ClientConnectionError
|
from aiohttp.client_exceptions import ClientConnectionError
|
||||||
|
from APsystemsEZ1 import InverterReturnedError
|
||||||
|
|
||||||
from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity
|
from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
@ -40,7 +41,7 @@ class ApSystemsInverterSwitch(ApSystemsEntity, SwitchEntity):
|
|||||||
"""Update switch status and availability."""
|
"""Update switch status and availability."""
|
||||||
try:
|
try:
|
||||||
status = await self._api.get_device_power_status()
|
status = await self._api.get_device_power_status()
|
||||||
except (TimeoutError, ClientConnectionError):
|
except (TimeoutError, ClientConnectionError, InverterReturnedError):
|
||||||
self._attr_available = False
|
self._attr_available = False
|
||||||
else:
|
else:
|
||||||
self._attr_available = True
|
self._attr_available = True
|
||||||
|
@ -480,7 +480,7 @@ apprise==1.9.0
|
|||||||
aprslib==0.7.2
|
aprslib==0.7.2
|
||||||
|
|
||||||
# homeassistant.components.apsystems
|
# homeassistant.components.apsystems
|
||||||
apsystems-ez1==2.2.1
|
apsystems-ez1==2.4.0
|
||||||
|
|
||||||
# homeassistant.components.aqualogic
|
# homeassistant.components.aqualogic
|
||||||
aqualogic==2.6
|
aqualogic==2.6
|
||||||
|
@ -453,7 +453,7 @@ apprise==1.9.0
|
|||||||
aprslib==0.7.2
|
aprslib==0.7.2
|
||||||
|
|
||||||
# homeassistant.components.apsystems
|
# homeassistant.components.apsystems
|
||||||
apsystems-ez1==2.2.1
|
apsystems-ez1==2.4.0
|
||||||
|
|
||||||
# homeassistant.components.aranet
|
# homeassistant.components.aranet
|
||||||
aranet4==2.4.0
|
aranet4==2.4.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user