Skip to content

Conversation

@coreywillwhat
Copy link
Contributor

@coreywillwhat coreywillwhat commented Aug 13, 2025

  • Added a configuration option to update password.
  • Error handling for incorrect password, and when the user login attempts are being throttled.

@coreywillwhat
Copy link
Contributor Author

coreywillwhat commented Aug 13, 2025

Tested – currently not working.

Steps to reproduce:

  • Update password in Options Flow to an incorrect password → login fails on reload. (Expected)
  • Update to the correct password → login still fails. (Not expected)

Notes:

  • This behavior may be due to the 3 login attempt limit and subsequent temporary account lockout.
  • Ideally, the integration should attempt the password only once after detecting an incorrect password error, and log the error without retrying.
  • Deleting the integration and immediately re-adding also fails.
  • Waiting 1 hour before re-adding allows successful login, which supports the temporary lockout theory.

@coreywillwhat
Copy link
Contributor Author

Confirmed - If we set the attempts to 1. We can set an incorrect password and it fails login. If we then set the correct password, login is successful when attempting login again.

@coreywillwhat
Copy link
Contributor Author

Added error handling for "Throttled" login attempts and "Incorrect Password".

@coreywillwhat coreywillwhat linked an issue Aug 13, 2025 that may be closed by this pull request

_LOGGER.debug(
"Preparing options form for %s with default scan interval: %s minutes, initial scan: %s, active scan: %s",
"Preparing options form for %s with defaults",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

reduce maintenance.

@coreywillwhat coreywillwhat marked this pull request as ready for review August 13, 2025 18:00
@coreywillwhat
Copy link
Contributor Author

Tested and all is working as expected. Single login attempt if wrong password entry, and single attempt if throttled error is returned.

@cdnninja
Copy link
Collaborator

Ideally this should follow the standard for incorrect username / password. Login should detect that specific error and throw an exception that home assistant triggers the re-auth flow. The exception is a ConfigEntryAuthFailed.

https://developers.home-assistant.io/docs/core/integration-quality-scale/rules/reauthentication-flow/
https://developers.home-assistant.io/docs/integration_setup_failures#handling-expired-credentials

It is also nice where you can edit whenever you want which I think this PR does nicely.

@coreywillwhat coreywillwhat marked this pull request as draft October 2, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Password update option

3 participants