diff --git a/homeassistant/components/life360/config_flow.py b/homeassistant/components/life360/config_flow.py index e24bb3639b6..83ad4138de8 100644 --- a/homeassistant/components/life360/config_flow.py +++ b/homeassistant/components/life360/config_flow.py @@ -53,7 +53,7 @@ class Life360ConfigFlow(config_entries.ConfigFlow): except vol.Invalid: errors[CONF_USERNAME] = "invalid_username" except LoginError: - errors["base"] = "invalid_credentials" + errors["base"] = "invalid_auth" except Life360Error as error: _LOGGER.error( "Unexpected error communicating with Life360 server: %s", error @@ -94,7 +94,7 @@ class Life360ConfigFlow(config_entries.ConfigFlow): ) except LoginError: _LOGGER.error("Invalid credentials for %s", username) - return self.async_abort(reason="invalid_credentials") + return self.async_abort(reason="invalid_auth") except Life360Error as error: _LOGGER.error( "Unexpected error communicating with Life360 server: %s", error diff --git a/homeassistant/components/life360/strings.json b/homeassistant/components/life360/strings.json index 0e91856c8fc..4018a899f44 100644 --- a/homeassistant/components/life360/strings.json +++ b/homeassistant/components/life360/strings.json @@ -12,7 +12,7 @@ }, "error": { "invalid_username": "Invalid username", - "invalid_credentials": "Invalid credentials", + "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]", "user_already_configured": "[%key:common::config_flow::abort::already_configured_account%]", "unexpected": "Unexpected error communicating with Life360 server" }, @@ -20,7 +20,7 @@ "default": "To set advanced options, see [Life360 documentation]({docs_url})." }, "abort": { - "invalid_credentials": "Invalid credentials", + "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]", "user_already_configured": "[%key:common::config_flow::abort::already_configured_account%]" } } diff --git a/homeassistant/components/simplisafe/config_flow.py b/homeassistant/components/simplisafe/config_flow.py index 0437c309039..c34255bc62a 100644 --- a/homeassistant/components/simplisafe/config_flow.py +++ b/homeassistant/components/simplisafe/config_flow.py @@ -65,7 +65,7 @@ class SimpliSafeFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): LOGGER.info("Awaiting confirmation of MFA email click") return await self.async_step_mfa() except InvalidCredentialsError: - errors = {"base": "invalid_credentials"} + errors = {"base": "invalid_auth"} except SimplipyError as err: LOGGER.error("Unknown error while logging into SimpliSafe: %s", err) errors = {"base": "unknown"} diff --git a/homeassistant/components/simplisafe/strings.json b/homeassistant/components/simplisafe/strings.json index 227f32ee42d..ad973261a0e 100644 --- a/homeassistant/components/simplisafe/strings.json +++ b/homeassistant/components/simplisafe/strings.json @@ -23,7 +23,7 @@ }, "error": { "identifier_exists": "Account already registered", - "invalid_credentials": "Invalid credentials", + "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]", "still_awaiting_mfa": "Still awaiting MFA email click", "unknown": "[%key:common::config_flow::error::unknown%]" }, diff --git a/tests/components/simplisafe/test_config_flow.py b/tests/components/simplisafe/test_config_flow.py index 599382e0121..d4ba26bd484 100644 --- a/tests/components/simplisafe/test_config_flow.py +++ b/tests/components/simplisafe/test_config_flow.py @@ -54,7 +54,7 @@ async def test_invalid_credentials(hass): result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data=conf ) - assert result["errors"] == {"base": "invalid_credentials"} + assert result["errors"] == {"base": "invalid_auth"} async def test_options_flow(hass):