Skip to content

Commit

Permalink
Fix host and model missing cause HA halt
Browse files Browse the repository at this point in the history
  • Loading branch information
niceboy committed Sep 20, 2024
1 parent 17f9515 commit 5676cd9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions custom_components/aqara_gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

This comment has been minimized.

Copy link
@m4rr

m4rr Oct 27, 2024

Ah that’s why it was freezing. Looking forward to 0.2.8.

_LOGGER.error("The IP or the model is missing while setupping etnry!")
raise ConfigEntryNotReady

await _setup_logger(hass)
Expand Down

1 comment on commit 5676cd9

@m4rr
Copy link

@m4rr m4rr commented on 5676cd9 Oct 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice finding. Thanks

Please sign in to comment.