Skip to content

Commit aed8532

Browse files
Fix update retry for Imeon inverter integration (#150936)
Co-authored-by: TheBushBoy <[email protected]>
1 parent 62be31f commit aed8532

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

homeassistant/components/imeon_inverter/coordinator.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ async def _async_update_data(self) -> dict[str, str | float | int]:
7575
data: dict[str, str | float | int] = {}
7676

7777
async with timeout(TIMEOUT):
78-
await self._api.login(
79-
self.config_entry.data[CONF_USERNAME],
80-
self.config_entry.data[CONF_PASSWORD],
81-
)
82-
83-
# Fetch data using distant API
8478
try:
79+
await self._api.login(
80+
self.config_entry.data[CONF_USERNAME],
81+
self.config_entry.data[CONF_PASSWORD],
82+
)
8583
await self._api.update()
8684
except (ValueError, TimeoutError, ClientError) as e:
8785
raise UpdateFailed(e) from e

0 commit comments

Comments
 (0)