diff --git a/homeassistant/components/nest/config_flow.py b/homeassistant/components/nest/config_flow.py index e792b496da5..6aaa5bcc489 100644 --- a/homeassistant/components/nest/config_flow.py +++ b/homeassistant/components/nest/config_flow.py @@ -177,7 +177,7 @@ class NestFlowHandler( return self.async_abort(reason="authorize_url_timeout") except Exception: # pylint: disable=broad-except _LOGGER.exception("Unexpected error generating auth url") - return self.async_abort(reason="authorize_url_fail") + return self.async_abort(reason="unknown_authorize_url_generation") return self.async_show_form( step_id="link", diff --git a/homeassistant/components/nest/strings.json b/homeassistant/components/nest/strings.json index 6882e8f55e7..0ce9c902121 100644 --- a/homeassistant/components/nest/strings.json +++ b/homeassistant/components/nest/strings.json @@ -25,7 +25,7 @@ "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]", "missing_configuration": "[%key:common::config_flow::abort::oauth2_missing_configuration%]", "authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]", - "authorize_url_fail": "Unknown error generating an authorize url.", + "unknown_authorize_url_generation": "[%key:common::config_flow::abort::unknown_authorize_url_generation%]", "no_url_available": "[%key:common::config_flow::abort::oauth2_no_url_available%]" }, "create_entry": { diff --git a/homeassistant/components/point/config_flow.py b/homeassistant/components/point/config_flow.py index 815b872d3e9..aaefc45bc9c 100644 --- a/homeassistant/components/point/config_flow.py +++ b/homeassistant/components/point/config_flow.py @@ -101,7 +101,7 @@ class PointFlowHandler(config_entries.ConfigFlow): return self.async_abort(reason="authorize_url_timeout") except Exception: # pylint: disable=broad-except _LOGGER.exception("Unexpected error generating auth url") - return self.async_abort(reason="authorize_url_fail") + return self.async_abort(reason="unknown_authorize_url_generation") return self.async_show_form( step_id="auth", description_placeholders={"authorization_url": url}, diff --git a/homeassistant/components/point/strings.json b/homeassistant/components/point/strings.json index 194121e8e25..8a28e314b69 100644 --- a/homeassistant/components/point/strings.json +++ b/homeassistant/components/point/strings.json @@ -23,7 +23,7 @@ "external_setup": "Point successfully configured from another flow.", "no_flows": "[%key:common::config_flow::abort::oauth2_missing_configuration%]", "authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]", - "authorize_url_fail": "Unknown error generating an authorize url." + "unknown_authorize_url_generation": "[%key:common::config_flow::abort::unknown_authorize_url_generation%]" } } } diff --git a/homeassistant/components/tellduslive/config_flow.py b/homeassistant/components/tellduslive/config_flow.py index ae8a9d1a690..aabbf88ee1c 100644 --- a/homeassistant/components/tellduslive/config_flow.py +++ b/homeassistant/components/tellduslive/config_flow.py @@ -97,12 +97,12 @@ class FlowHandler(config_entries.ConfigFlow): with async_timeout.timeout(10): auth_url = await self.hass.async_add_executor_job(self._get_auth_url) if not auth_url: - return self.async_abort(reason="authorize_url_fail") + return self.async_abort(reason="unknown_authorize_url_generation") except asyncio.TimeoutError: return self.async_abort(reason="authorize_url_timeout") except Exception: # pylint: disable=broad-except _LOGGER.exception("Unexpected error generating auth url") - return self.async_abort(reason="authorize_url_fail") + return self.async_abort(reason="unknown_authorize_url_generation") _LOGGER.debug("Got authorization URL %s", auth_url) return self.async_show_form( diff --git a/homeassistant/components/tellduslive/strings.json b/homeassistant/components/tellduslive/strings.json index 8d1c2c1acaf..27e74d6d938 100644 --- a/homeassistant/components/tellduslive/strings.json +++ b/homeassistant/components/tellduslive/strings.json @@ -2,7 +2,7 @@ "config": { "abort": { "already_configured": "[%key:common::config_flow::abort::already_configured_service%]", - "authorize_url_fail": "Unknown error generating an authorize url.", + "unknown_authorize_url_generation": "[%key:common::config_flow::abort::unknown_authorize_url_generation%]", "authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]", "unknown": "[%key:common::config_flow::error::unknown%]" }, diff --git a/homeassistant/components/toon/strings.json b/homeassistant/components/toon/strings.json index c5ac07516b6..60d5ed3312c 100644 --- a/homeassistant/components/toon/strings.json +++ b/homeassistant/components/toon/strings.json @@ -14,7 +14,7 @@ }, "abort": { "already_configured": "The selected agreement is already configured.", - "authorize_url_fail": "Unknown error generating an authorize url.", + "unknown_authorize_url_generation": "[%key:common::config_flow::abort::unknown_authorize_url_generation%]", "authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]", "missing_configuration": "[%key:common::config_flow::abort::oauth2_missing_configuration%]", "no_agreements": "This account has no Toon displays.", diff --git a/homeassistant/strings.json b/homeassistant/strings.json index f36c62b91ce..e2a85637fbb 100644 --- a/homeassistant/strings.json +++ b/homeassistant/strings.json @@ -70,7 +70,8 @@ "oauth2_missing_configuration": "The component is not configured. Please follow the documentation.", "oauth2_authorize_url_timeout": "Timeout generating authorize URL.", "oauth2_no_url_available": "No URL available. For information about this error, [check the help section]({docs_url})", - "reauth_successful": "Re-authentication was successful" + "reauth_successful": "Re-authentication was successful", + "unknown_authorize_url_generation": "Unknown error generating an authorize url." } } } diff --git a/tests/components/nest/test_config_flow_legacy.py b/tests/components/nest/test_config_flow_legacy.py index e0e93bf626a..23e01cf239a 100644 --- a/tests/components/nest/test_config_flow_legacy.py +++ b/tests/components/nest/test_config_flow_legacy.py @@ -100,7 +100,7 @@ async def test_abort_if_exception_generating_auth_url(hass): flow.hass = hass result = await flow.async_step_init() assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT - assert result["reason"] == "authorize_url_fail" + assert result["reason"] == "unknown_authorize_url_generation" async def test_verify_code_timeout(hass): diff --git a/tests/components/point/test_config_flow.py b/tests/components/point/test_config_flow.py index b6c780e937a..67817b308ce 100644 --- a/tests/components/point/test_config_flow.py +++ b/tests/components/point/test_config_flow.py @@ -141,7 +141,7 @@ async def test_abort_if_exception_generating_auth_url(hass): result = await flow.async_step_user() assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT - assert result["reason"] == "authorize_url_fail" + assert result["reason"] == "unknown_authorize_url_generation" async def test_abort_no_code(hass): diff --git a/tests/components/tellduslive/test_config_flow.py b/tests/components/tellduslive/test_config_flow.py index 66476c8735d..7417c87c229 100644 --- a/tests/components/tellduslive/test_config_flow.py +++ b/tests/components/tellduslive/test_config_flow.py @@ -229,7 +229,7 @@ async def test_abort_no_auth_url(hass, mock_tellduslive): result = await flow.async_step_user() assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT - assert result["reason"] == "authorize_url_fail" + assert result["reason"] == "unknown_authorize_url_generation" async def test_abort_if_exception_generating_auth_url(hass, mock_tellduslive): @@ -238,7 +238,7 @@ async def test_abort_if_exception_generating_auth_url(hass, mock_tellduslive): result = await flow.async_step_user() assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT - assert result["reason"] == "authorize_url_fail" + assert result["reason"] == "unknown_authorize_url_generation" async def test_discovery_already_configured(hass, mock_tellduslive):