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
ConfigEntryAuthFailed exception in case the creds are funny.
- Throw a
ConfigEntryNotReady exception in case something unexpected happens.
Also, remove the get_devices call.
This is related to qbaware/pyeldom#4.
In the
initfile, the login flow should be improved.ConfigEntryAuthFailedexception in case the creds are funny.ConfigEntryNotReadyexception in case something unexpected happens.Also, remove the
get_devicescall.This is related to qbaware/pyeldom#4.