From 3b7271d597d18da1b6add30515110bf0b8e2cfb4 Mon Sep 17 00:00:00 2001 From: mkmer Date: Thu, 8 Feb 2024 04:51:20 -0500 Subject: [PATCH] Catch APIRateLimit in Honeywell (#107806) --- homeassistant/components/honeywell/climate.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/honeywell/climate.py b/homeassistant/components/honeywell/climate.py index efd06ba2905..6bc6169c68c 100644 --- a/homeassistant/components/honeywell/climate.py +++ b/homeassistant/components/honeywell/climate.py @@ -7,6 +7,7 @@ from typing import Any from aiohttp import ClientConnectionError from aiosomecomfort import ( + APIRateLimited, AuthError, ConnectionError as AscConnectionError, SomeComfortError, @@ -505,10 +506,11 @@ class HoneywellUSThermostat(ClimateEntity): await self._device.refresh() except ( + asyncio.TimeoutError, + AscConnectionError, + APIRateLimited, AuthError, ClientConnectionError, - AscConnectionError, - asyncio.TimeoutError, ): self._retry += 1 self._attr_available = self._retry <= RETRY @@ -524,7 +526,12 @@ class HoneywellUSThermostat(ClimateEntity): await _login() return - except (AscConnectionError, ClientConnectionError, asyncio.TimeoutError): + except ( + asyncio.TimeoutError, + AscConnectionError, + APIRateLimited, + ClientConnectionError, + ): self._retry += 1 self._attr_available = self._retry <= RETRY return