From f085a0c54a6208216190342a5865f1d2addc98a4 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 31 Mar 2020 13:59:03 -0500 Subject: [PATCH] Retry sense setup later if listing devices times out. (#33455) --- homeassistant/components/sense/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/sense/__init__.py b/homeassistant/components/sense/__init__.py index 13452c97088..80e75bce400 100644 --- a/homeassistant/components/sense/__init__.py +++ b/homeassistant/components/sense/__init__.py @@ -106,7 +106,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): raise ConfigEntryNotReady sense_devices_data = SenseDevicesData() - sense_discovered_devices = await gateway.get_discovered_device_data() + try: + sense_discovered_devices = await gateway.get_discovered_device_data() + except SENSE_TIMEOUT_EXCEPTIONS: + raise ConfigEntryNotReady hass.data[DOMAIN][entry.entry_id] = { SENSE_DATA: gateway,