diff --git a/homeassistant/components/somfy/config_flow.py b/homeassistant/components/somfy/config_flow.py index 2d143fbd196..80fc2192d8e 100644 --- a/homeassistant/components/somfy/config_flow.py +++ b/homeassistant/components/somfy/config_flow.py @@ -24,6 +24,6 @@ class SomfyFlowHandler(config_entry_oauth2_flow.AbstractOAuth2FlowHandler): async def async_step_user(self, user_input=None): """Handle a flow start.""" if self.hass.config_entries.async_entries(DOMAIN): - return self.async_abort(reason="already_setup") + return self.async_abort(reason="single_instance_allowed") return await super().async_step_user(user_input) diff --git a/homeassistant/components/somfy/strings.json b/homeassistant/components/somfy/strings.json index d1fa921bb8e..2f54456091c 100644 --- a/homeassistant/components/somfy/strings.json +++ b/homeassistant/components/somfy/strings.json @@ -4,11 +4,13 @@ "pick_implementation": { "title": "Pick Authentication Method" } }, "abort": { - "already_setup": "You can only configure one Somfy account.", + "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]", "authorize_url_timeout": "Timeout generating authorize url.", "missing_configuration": "The Somfy component is not configured. Please follow the documentation.", "no_url_available": "[%key:common::config_flow::abort::oauth2_no_url_available%]" }, - "create_entry": { "default": "Successfully authenticated with Somfy." } + "create_entry": { + "default": "[%key:common::config_flow::create_entry::authenticated%]" + } } } diff --git a/tests/components/somfy/test_config_flow.py b/tests/components/somfy/test_config_flow.py index b1df938b3b1..89b4fbe9b13 100644 --- a/tests/components/somfy/test_config_flow.py +++ b/tests/components/somfy/test_config_flow.py @@ -49,7 +49,7 @@ async def test_abort_if_existing_entry(hass): result = await flow.async_step_user() assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT - assert result["reason"] == "already_setup" + assert result["reason"] == "single_instance_allowed" async def test_full_flow(hass, aiohttp_client, aioclient_mock, current_request):