Skip to content

Commit 5676cd9

Browse files
author
niceboy
committed
Fix host and model missing cause HA halt
1 parent 17f9515 commit 5676cd9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

custom_components/aqara_gateway/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
4949
options=entry.data)
5050

5151
if "model" not in entry.options or "password" not in entry.options:
52+
_LOGGER.error("The model is missing while setupping entry!")
53+
raise ConfigEntryNotReady
54+
55+
if (len(entry.options.get("host")) < 0) or (len(entry.options.get("model")) < 0):
56+
_LOGGER.error("The IP or the model is missing while setupping etnry!")
5257
raise ConfigEntryNotReady
5358

5459
await _setup_logger(hass)

0 commit comments

Comments
 (0)