Skip to content

Commit 8672030

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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

custom_components/aqara_gateway/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
5151
if "model" not in entry.options or "password" not in entry.options:
5252
raise ConfigEntryNotReady
5353

54+
if (len(entry.options.get("host")) < 0) or (len(entry.options.get("model")) < 0):
55+
raise ConfigEntryNotReady
56+
5457
await _setup_logger(hass)
5558

5659
config = hass.data[DOMAIN]['config']

0 commit comments

Comments
 (0)