diff --git a/custom_components/aqara_gateway/__init__.py b/custom_components/aqara_gateway/__init__.py index 949fae1..7830ae1 100755 --- a/custom_components/aqara_gateway/__init__.py +++ b/custom_components/aqara_gateway/__init__.py @@ -49,6 +49,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): options=entry.data) if "model" not in entry.options or "password" not in entry.options: + _LOGGER.error("The model is missing while setupping entry!") + raise ConfigEntryNotReady + + if (len(entry.options.get("host")) < 0) or (len(entry.options.get("model")) < 0): + _LOGGER.error("The IP or the model is missing while setupping etnry!") raise ConfigEntryNotReady await _setup_logger(hass)