Common strings in Freebox config flow (#40938)

This commit is contained in:
SNoof85 2020-10-01 11:31:43 +02:00 committed by GitHub
parent 22ba6e06fd
commit 0a700f7272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -92,7 +92,7 @@ class FreeboxFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
except HttpRequestError:
_LOGGER.error("Error connecting to the Freebox router at %s", self._host)
errors["base"] = "connection_failed"
errors["base"] = "cannot_connect"
except Exception: # pylint: disable=broad-except
_LOGGER.exception(

View file

@ -15,7 +15,7 @@
},
"error": {
"register_failed": "Failed to register, please try again",
"connection_failed": "[%key:common::config_flow::error::cannot_connect%]",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"unknown": "[%key:common::config_flow::error::unknown%]"
},
"abort": {

View file

@ -139,7 +139,7 @@ async def test_on_link_failed(hass):
):
result = await hass.config_entries.flow.async_configure(result["flow_id"], {})
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
assert result["errors"] == {"base": "connection_failed"}
assert result["errors"] == {"base": "cannot_connect"}
with patch(
"homeassistant.components.freebox.router.Freepybox.open",