Improve sense timeout exception handling (#33127)
asyncio.Timeout needs to be trapped as well
This commit is contained in:
1 parent
0b2a8bf79a
commit
fa60e9b03b
4 files changed
+14
-11
No files matched your search
@@ -26,6 +26,7 @@ from .const import (
|
||||
SENSE_DEVICE_UPDATE,
|
||||
SENSE_DEVICES_DATA,
|
||||
SENSE_DISCOVERED_DEVICES_DATA,
|
||||
SENSE_TIMEOUT_EXCEPTIONS,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@@ -101,7 +102,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||
except SenseAuthenticationException:
|
||||
_LOGGER.error("Could not authenticate with sense server")
|
||||
return False
|
||||
except SenseAPITimeoutException:
|
||||
except SENSE_TIMEOUT_EXCEPTIONS:
|
||||
raise ConfigEntryNotReady
|
||||
|
||||
sense_devices_data = SenseDevicesData()
|
||||
|
||||
Reference in new issue
Block a user