From 6ab9d0bc31467b1c6fb3425158ba7db8f802f7e4 Mon Sep 17 00:00:00 2001 From: scheric <38077357+scheric@users.noreply.github.com> Date: Tue, 6 Oct 2020 18:50:32 +0200 Subject: [PATCH] add common strings (#41350) --- homeassistant/components/arcam_fmj/config_flow.py | 2 +- homeassistant/components/arcam_fmj/strings.json | 4 ++-- tests/components/arcam_fmj/test_config_flow.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/arcam_fmj/config_flow.py b/homeassistant/components/arcam_fmj/config_flow.py index 2a9f1946cb4..c04757e75d3 100644 --- a/homeassistant/components/arcam_fmj/config_flow.py +++ b/homeassistant/components/arcam_fmj/config_flow.py @@ -37,7 +37,7 @@ class ArcamFmjFlowHandler(config_entries.ConfigFlow): try: await client.start() except ConnectionFailed: - return self.async_abort(reason="unable_to_connect") + return self.async_abort(reason="cannot_connect") finally: await client.stop() diff --git a/homeassistant/components/arcam_fmj/strings.json b/homeassistant/components/arcam_fmj/strings.json index a7a432ce7a4..b6a7d6ee559 100644 --- a/homeassistant/components/arcam_fmj/strings.json +++ b/homeassistant/components/arcam_fmj/strings.json @@ -1,9 +1,9 @@ { "config": { "abort": { - "already_configured": "Device was already setup.", + "already_configured": "[%key:common::config_flow::abort::already_configured_device%]", "already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]", - "unable_to_connect": "Unable to connect to device." + "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]" }, "error": {}, "flow_title": "Arcam FMJ on {host}", diff --git a/tests/components/arcam_fmj/test_config_flow.py b/tests/components/arcam_fmj/test_config_flow.py index 032f57c3113..7de4b83723e 100644 --- a/tests/components/arcam_fmj/test_config_flow.py +++ b/tests/components/arcam_fmj/test_config_flow.py @@ -99,7 +99,7 @@ async def test_ssdp_unable_to_connect(hass, dummy_client): result = await hass.config_entries.flow.async_configure(result["flow_id"], {}) assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT - assert result["reason"] == "unable_to_connect" + assert result["reason"] == "cannot_connect" async def test_ssdp_update(hass):