mirror of
https://github.com/home-assistant/core.git
synced 2026-09-05 18:25:01 -05:00
Fix update retry for Imeon inverter integration (#150936)
Co-authored-by: TheBushBoy <theodavid@icloud.com>
This commit is contained in:
co-authored by
TheBushBoy
parent
62be31f899
commit
aed853267a
@@ -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, TimeoutError, ClientError) as e:
|
||||
raise UpdateFailed(e) from e
|
||||
|
||||
Reference in New Issue
Block a user