From f5248b55628cdf5722ef412bd3ca35834048d763 Mon Sep 17 00:00:00 2001 From: scheric <38077357+scheric@users.noreply.github.com> Date: Wed, 14 Oct 2020 21:54:23 +0200 Subject: [PATCH] Use common strings in withings config flow (#41770) --- homeassistant/components/withings/config_flow.py | 2 +- homeassistant/components/withings/strings.json | 2 +- tests/components/withings/test_config_flow.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/withings/config_flow.py b/homeassistant/components/withings/config_flow.py index e28b9826d90..e1efa3406f2 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"] = "already_configured_account" + errors["base"] = "already_configured" return self.async_show_form( step_id="profile", diff --git a/homeassistant/components/withings/strings.json b/homeassistant/components/withings/strings.json index 03ac7865967..166f25e41ff 100644 --- a/homeassistant/components/withings/strings.json +++ b/homeassistant/components/withings/strings.json @@ -14,7 +14,7 @@ } }, "error": { - "already_configured_account": "[%key:common::config_flow::abort::already_configured_account%]" + "already_configured": "[%key:common::config_flow::abort::already_configured_account%]" }, "abort": { "authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]", diff --git a/tests/components/withings/test_config_flow.py b/tests/components/withings/test_config_flow.py index fe3edcfd892..cb0ea5b29ab 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"] == "already_configured_account" + assert result["errors"]["base"] == "already_configured" async def test_config_reauth_profile(