mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Common strings in Freebox config flow (#40938)
This commit is contained in:
parent
22ba6e06fd
commit
0a700f7272
@ -92,7 +92,7 @@ class FreeboxFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
|
|
||||||
except HttpRequestError:
|
except HttpRequestError:
|
||||||
_LOGGER.error("Error connecting to the Freebox router at %s", self._host)
|
_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
|
except Exception: # pylint: disable=broad-except
|
||||||
_LOGGER.exception(
|
_LOGGER.exception(
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"register_failed": "Failed to register, please try again",
|
"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%]"
|
"unknown": "[%key:common::config_flow::error::unknown%]"
|
||||||
},
|
},
|
||||||
"abort": {
|
"abort": {
|
||||||
|
@ -139,7 +139,7 @@ async def test_on_link_failed(hass):
|
|||||||
):
|
):
|
||||||
result = await hass.config_entries.flow.async_configure(result["flow_id"], {})
|
result = await hass.config_entries.flow.async_configure(result["flow_id"], {})
|
||||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||||
assert result["errors"] == {"base": "connection_failed"}
|
assert result["errors"] == {"base": "cannot_connect"}
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.freebox.router.Freepybox.open",
|
"homeassistant.components.freebox.router.Freepybox.open",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user