mirror of
https://github.com/home-assistant/core.git
synced 2025-09-08 06:11:31 +02:00
Fix update retry for Imeon inverter integration (#150936)
Co-authored-by: TheBushBoy <theodavid@icloud.com>
This commit is contained in:
committed by
Paulus Schoutsen
parent
9194ddd4fe
commit
add75e06e3
@@ -75,13 +75,11 @@ class InverterCoordinator(DataUpdateCoordinator[dict[str, str | float | int]]):
|
||||
data: dict[str, str | float | int] = {}
|
||||
|
||||
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:
|
||||
await self._api.login(
|
||||
self.config_entry.data[CONF_USERNAME],
|
||||
self.config_entry.data[CONF_PASSWORD],
|
||||
)
|
||||
await self._api.update()
|
||||
except (ValueError, ClientError) as e:
|
||||
raise UpdateFailed(e) from e
|
||||
|
Reference in New Issue
Block a user