|
|
@@ -311,7 +311,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
|
|
get_device_id(entry.data),
|
|
|
)
|
|
|
config = {**entry.data, **entry.options, "name": entry.title}
|
|
|
- setup_device(hass, config)
|
|
|
+ try:
|
|
|
+ setup_device(hass, config)
|
|
|
+ except Exception as e:
|
|
|
+ raise ConfigEntryNotReady("tuya-local device not ready") from e
|
|
|
+
|
|
|
device_conf = get_config(entry.data[CONF_TYPE])
|
|
|
if device_conf is None:
|
|
|
_LOGGER.error(NOT_FOUND, config[CONF_TYPE])
|