Common strings in Freebox config flow (#40938)
This commit is contained in:
parent
22ba6e06fd
commit
0a700f7272
3 changed files with 3 additions and 3 deletions
|
@ -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(
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue