diff --git a/homeassistant/components/asuswrt/config_flow.py b/homeassistant/components/asuswrt/config_flow.py index e1b34cca15b..ec5cccb9a71 100644 --- a/homeassistant/components/asuswrt/config_flow.py +++ b/homeassistant/components/asuswrt/config_flow.py @@ -149,10 +149,10 @@ class AsusWrtFlowHandler(ConfigFlow, domain=DOMAIN): ) -> FlowResult: """Handle a flow initiated by the user.""" - # if exist one entry without unique ID, we abort config flow + # if there's one entry without unique ID, we abort config flow for unique_id in self._async_current_ids(): if unique_id is None: - return self.async_abort(reason="not_unique_id_exist") + return self.async_abort(reason="no_unique_id") if user_input is None: return self._show_setup_form(user_input) @@ -188,7 +188,7 @@ class AsusWrtFlowHandler(ConfigFlow, domain=DOMAIN): return self.async_abort(reason="invalid_unique_id") else: _LOGGER.warning( - "This device do not provide a valid Unique ID." + "This device does not provide a valid Unique ID." " Configuration of multiple instance will not be possible" ) diff --git a/homeassistant/components/asuswrt/strings.json b/homeassistant/components/asuswrt/strings.json index 73887fcc4af..bd0c706e74a 100644 --- a/homeassistant/components/asuswrt/strings.json +++ b/homeassistant/components/asuswrt/strings.json @@ -26,7 +26,7 @@ }, "abort": { "invalid_unique_id": "Impossible to determine a valid unique id for the device", - "not_unique_id_exist": "A device without a valid unique id is already configured. Configuration of multiple instance is not possible" + "no_unique_id": "A device without a valid unique id is already configured. Configuration of multiple instance is not possible" } }, "options": { diff --git a/homeassistant/components/asuswrt/translations/en.json b/homeassistant/components/asuswrt/translations/en.json index 4d4ea4d0a30..f93eae80e6d 100644 --- a/homeassistant/components/asuswrt/translations/en.json +++ b/homeassistant/components/asuswrt/translations/en.json @@ -2,8 +2,7 @@ "config": { "abort": { "invalid_unique_id": "Impossible to determine a valid unique id for the device", - "not_unique_id_exist": "A device without a valid unique id is already configured. Configuration of multiple instance is not possible", - "single_instance_allowed": "Already configured. Only a single configuration possible." + "no_unique_id": "A device without a valid unique id is already configured. Configuration of multiple instance is not possible" }, "error": { "cannot_connect": "Failed to connect", @@ -44,4 +43,4 @@ } } } -} +} \ No newline at end of file diff --git a/tests/components/asuswrt/test_config_flow.py b/tests/components/asuswrt/test_config_flow.py index 09c484ff69d..8475bd48f9a 100644 --- a/tests/components/asuswrt/test_config_flow.py +++ b/tests/components/asuswrt/test_config_flow.py @@ -169,7 +169,7 @@ async def test_abort_if_not_unique_id_setup(hass): data=CONFIG_DATA, ) assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT - assert result["reason"] == "not_unique_id_exist" + assert result["reason"] == "no_unique_id" @pytest.mark.usefixtures("connect")