Fix update retry for Imeon inverter integration (#150936)

Co-authored-by: TheBushBoy <theodavid@icloud.com>
This commit is contained in:
Imeon-Energy
2025-08-21 13:31:06 +02:00
committed by Paulus Schoutsen
parent 9194ddd4fe
commit add75e06e3

View File

@@ -75,13 +75,11 @@ class InverterCoordinator(DataUpdateCoordinator[dict[str, str | float | int]]):
data: dict[str, str | float | int] = {} data: dict[str, str | float | int] = {}
async with timeout(TIMEOUT): async with timeout(TIMEOUT):
await self._api.login(
self.config_entry.data[CONF_USERNAME],
self.config_entry.data[CONF_PASSWORD],
)
# Fetch data using distant API
try: try:
await self._api.login(
self.config_entry.data[CONF_USERNAME],
self.config_entry.data[CONF_PASSWORD],
)
await self._api.update() await self._api.update()
except (ValueError, ClientError) as e: except (ValueError, ClientError) as e:
raise UpdateFailed(e) from e raise UpdateFailed(e) from e