-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In the init file, the login flow should be improved.
try:
await api_client.login(email, password)
await api_client.get_devices() # NOTE: This is needed since currently the login API does not throw an error if the credentials are invalid: https://github.com/qbaware/homeassistant-eldom/issues/27
_LOGGER.info("Successfully authenticated with Eldom API")
except Exception as e:
_LOGGER.error("Unexpected exception while authenticating with Eldom API: %s", e)
raise ConfigEntryNotReady(
f"Unexpected exception while authenticating with Eldom API: {e}"
) from e
- Throw a
ConfigEntryAuthFailedexception in case the creds are funny. - Throw a
ConfigEntryNotReadyexception in case something unexpected happens.
Also, remove the get_devices call.
This is related to qbaware/pyeldom#4.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request