diff --git a/homeassistant/components/withings/config_flow.py b/homeassistant/components/withings/config_flow.py index e1a1dee3191..e28b9826d90 100644 --- a/homeassistant/components/withings/config_flow.py +++ b/homeassistant/components/withings/config_flow.py @@ -70,7 +70,7 @@ class WithingsFlowHandler( self._current_data = {} return await self.async_step_finish(new_data) - errors["base"] = "profile_exists" + errors["base"] = "already_configured_account" return self.async_show_form( step_id="profile", diff --git a/homeassistant/components/withings/strings.json b/homeassistant/components/withings/strings.json index 05f6d15ca11..03ac7865967 100644 --- a/homeassistant/components/withings/strings.json +++ b/homeassistant/components/withings/strings.json @@ -14,14 +14,16 @@ } }, "error": { - "profile_exists": "User profile is already configured. Please provide a unique profile name." + "already_configured_account": "[%key:common::config_flow::abort::already_configured_account%]" }, "abort": { - "authorize_url_timeout": "Timeout generating authorize url.", - "missing_configuration": "The Withings integration is not configured. Please follow the documentation.", + "authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]", + "missing_configuration": "[%key:common::config_flow::abort::oauth2_missing_configuration%]", "already_configured": "Configuration updated for profile.", "no_url_available": "[%key:common::config_flow::abort::oauth2_no_url_available%]" }, - "create_entry": { "default": "Successfully authenticated with Withings." } + "create_entry": { + "default": "Successfully authenticated with Withings." + } } } diff --git a/tests/components/withings/test_config_flow.py b/tests/components/withings/test_config_flow.py index 2b4776c0ca5..fe3edcfd892 100644 --- a/tests/components/withings/test_config_flow.py +++ b/tests/components/withings/test_config_flow.py @@ -30,7 +30,7 @@ async def test_config_non_unique_profile(hass: HomeAssistant) -> None: ) assert result - assert result["errors"]["base"] == "profile_exists" + assert result["errors"]["base"] == "already_configured_account" async def test_config_reauth_profile(