Skip to content

Commit add75e0

Browse files
Imeon-EnergyTheBushBoy
authored andcommitted
Fix update retry for Imeon inverter integration (home-assistant#150936)
Co-authored-by: TheBushBoy <[email protected]>
1 parent 9194ddd commit add75e0

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, ClientError) as e:
8785
raise UpdateFailed(e) from e

0 commit comments

Comments
 (0)