mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
Use of reference strings in Transmission config flow (#41215)
This commit is contained in:
@@ -64,13 +64,12 @@ class TransmissionFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
if entry.data[CONF_NAME] == user_input[CONF_NAME]:
|
||||
errors[CONF_NAME] = "name_exists"
|
||||
break
|
||||
|
||||
try:
|
||||
await get_api(self.hass, user_input)
|
||||
|
||||
except AuthenticationError:
|
||||
errors[CONF_USERNAME] = "wrong_credentials"
|
||||
errors[CONF_PASSWORD] = "wrong_credentials"
|
||||
errors[CONF_USERNAME] = "invalid_auth"
|
||||
errors[CONF_PASSWORD] = "invalid_auth"
|
||||
except (CannotConnect, UnknownError):
|
||||
errors["base"] = "cannot_connect"
|
||||
|
||||
|
Reference in New Issue
Block a user