Improve sense timeout exception handling (#33127)

asyncio.Timeout needs to be trapped as well
This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-03-22 21:41:59 -07:00
1 parent 0b2a8bf79a
commit fa60e9b03b
4 files changed
+14 -11

No files matched your search

+2 -1
View File
@@ -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()