diff --git a/homeassistant/components/rfxtrx/__init__.py b/homeassistant/components/rfxtrx/__init__.py index d247c7a8d4d..9eaa705bf3e 100644 --- a/homeassistant/components/rfxtrx/__init__.py +++ b/homeassistant/components/rfxtrx/__init__.py @@ -36,7 +36,6 @@ from homeassistant.const import ( VOLT, ) from homeassistant.core import callback -from homeassistant.exceptions import ConfigEntryNotReady import homeassistant.helpers.config_validation as cv from homeassistant.helpers.restore_state import RestoreEntity @@ -191,7 +190,14 @@ async def async_setup_entry(hass, entry: config_entries.ConfigEntry): hass.data[DOMAIN][DATA_CLEANUP_CALLBACKS] = [] - await async_setup_internal(hass, entry) + try: + await async_setup_internal(hass, entry) + except asyncio.TimeoutError: + # Library currently doesn't support reload + _LOGGER.error( + "Connection timeout: failed to receive response from RFXtrx device" + ) + return False for domain in DOMAINS: hass.async_create_task( @@ -263,11 +269,8 @@ async def async_setup_internal(hass, entry: config_entries.ConfigEntry): config = entry.data # Initialize library - try: - async with async_timeout.timeout(5): - rfx_object = await hass.async_add_executor_job(_create_rfx, config) - except asyncio.TimeoutError as err: - raise ConfigEntryNotReady from err + async with async_timeout.timeout(30): + rfx_object = await hass.async_add_executor_job(_create_rfx, config) # Setup some per device config devices = _get_device_lookup(config[CONF_DEVICES])