Skip to content

Commit

Permalink
Catch APIRateLimit in Honeywell (#107806)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkmer authored Feb 8, 2024
1 parent 2d88b77 commit 168657b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions homeassistant/components/honeywell/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from aiohttp import ClientConnectionError
from aiosomecomfort import (
APIRateLimited,
AuthError,
ConnectionError as AscConnectionError,
SomeComfortError,
Expand Down Expand Up @@ -504,10 +505,11 @@ async def _login() -> None:
await self._device.refresh()

except (
TimeoutError,
AscConnectionError,
APIRateLimited,
AuthError,
ClientConnectionError,
AscConnectionError,
TimeoutError,
):
self._retry += 1
self._attr_available = self._retry <= RETRY
Expand All @@ -522,8 +524,12 @@ async def _login() -> None:
except UnauthorizedError:
await _login()
return

except (AscConnectionError, ClientConnectionError, TimeoutError):
except (
TimeoutError,
AscConnectionError,
APIRateLimited,
ClientConnectionError,
):
self._retry += 1
self._attr_available = self._retry <= RETRY
return
Expand Down

0 comments on commit 168657b

Please sign in to comment.