mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Handle Uncaught exceptions in async_update Honeywell (#90746)
This commit is contained in:
parent
d67265bb66
commit
096e814929
@ -1,9 +1,11 @@
|
|||||||
"""Support for Honeywell (US) Total Connect Comfort climate systems."""
|
"""Support for Honeywell (US) Total Connect Comfort climate systems."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import asyncio
|
||||||
import datetime
|
import datetime
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from aiohttp import ClientConnectionError
|
||||||
import aiosomecomfort
|
import aiosomecomfort
|
||||||
|
|
||||||
from homeassistant.components.climate import (
|
from homeassistant.components.climate import (
|
||||||
@ -421,10 +423,7 @@ class HoneywellUSThermostat(ClimateEntity):
|
|||||||
try:
|
try:
|
||||||
await self._device.refresh()
|
await self._device.refresh()
|
||||||
self._attr_available = True
|
self._attr_available = True
|
||||||
except (
|
except aiosomecomfort.SomeComfortError:
|
||||||
aiosomecomfort.SomeComfortError,
|
|
||||||
OSError,
|
|
||||||
):
|
|
||||||
try:
|
try:
|
||||||
await self._data.client.login()
|
await self._data.client.login()
|
||||||
|
|
||||||
@ -433,5 +432,12 @@ class HoneywellUSThermostat(ClimateEntity):
|
|||||||
await self.hass.async_create_task(
|
await self.hass.async_create_task(
|
||||||
self.hass.config_entries.async_reload(self._data.entry_id)
|
self.hass.config_entries.async_reload(self._data.entry_id)
|
||||||
)
|
)
|
||||||
except aiosomecomfort.SomeComfortError:
|
except (
|
||||||
|
aiosomecomfort.SomeComfortError,
|
||||||
|
ClientConnectionError,
|
||||||
|
asyncio.TimeoutError,
|
||||||
|
):
|
||||||
self._attr_available = False
|
self._attr_available = False
|
||||||
|
|
||||||
|
except (ClientConnectionError, asyncio.TimeoutError):
|
||||||
|
self._attr_available = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user