Skip to content

Commit

Permalink
Raise ConfigEntryNotReady instead of ConfigEntryAuthFailed when authe…
Browse files Browse the repository at this point in the history
…ntication failed.

This seems counterintuitivie, but AuthFailed tries to start a flow to allow a user to re-auth. In our case, auth failures are more likely a network issue so raising NotReady should cause it to try again later.
  • Loading branch information
mill1000 committed Feb 20, 2024
1 parent f67c711 commit 64ecd96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/midea_ac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
if token and key:
success = await device.authenticate(token, key)
if not success:
raise ConfigEntryAuthFailed(
raise ConfigEntryNotReady(
"Failed to authenticate with device.")

# Configure the connection lifetime
Expand Down

0 comments on commit 64ecd96

Please sign in to comment.