diff --git a/homeassistant/components/transmission/config_flow.py b/homeassistant/components/transmission/config_flow.py index 56ed3081b63..890a0f3dfa9 100644 --- a/homeassistant/components/transmission/config_flow.py +++ b/homeassistant/components/transmission/config_flow.py @@ -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" diff --git a/homeassistant/components/transmission/strings.json b/homeassistant/components/transmission/strings.json index c8d999a920c..81725ad7d16 100644 --- a/homeassistant/components/transmission/strings.json +++ b/homeassistant/components/transmission/strings.json @@ -13,12 +13,12 @@ } }, "error": { - "name_exists": "Name already exists", - "wrong_credentials": "Wrong username or password", - "cannot_connect": "Unable to Connect to host" + "name_exists": "[%key:common::config_flow::data::name%] already exists", + "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]", + "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]" }, "abort": { - "already_configured": "Host is already configured." + "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" } }, "options": { diff --git a/tests/components/transmission/test_config_flow.py b/tests/components/transmission/test_config_flow.py index 0820e71ae3b..0b57ab59913 100644 --- a/tests/components/transmission/test_config_flow.py +++ b/tests/components/transmission/test_config_flow.py @@ -264,8 +264,8 @@ async def test_error_on_wrong_credentials(hass, auth_error): ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["errors"] == { - CONF_USERNAME: "wrong_credentials", - CONF_PASSWORD: "wrong_credentials", + CONF_USERNAME: "invalid_auth", + CONF_PASSWORD: "invalid_auth", }