diff --git a/homeassistant/components/simplisafe/config_flow.py b/homeassistant/components/simplisafe/config_flow.py index 68974fe118fe..6494b84981bd 100644 --- a/homeassistant/components/simplisafe/config_flow.py +++ b/homeassistant/components/simplisafe/config_flow.py @@ -27,6 +27,10 @@ from homeassistant.helpers import aiohttp_client, config_validation as cv from .const import DOMAIN, LOGGER CONF_AUTH_CODE = "auth_code" +CONF_DOCUMENTATION_URL = "documentation_url" +DOCUMENTATION_URL = ( + "https://home-assistant.io/integrations/simplisafe#getting-an-authorization-code" +) STEP_USER_SCHEMA = vol.Schema( { @@ -84,7 +88,10 @@ class SimpliSafeFlowHandler(ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="user", data_schema=STEP_USER_SCHEMA, - description_placeholders={CONF_URL: self._oauth_values.auth_url}, + description_placeholders={ + CONF_URL: self._oauth_values.auth_url, + CONF_DOCUMENTATION_URL: DOCUMENTATION_URL, + }, ) auth_code = user_input[CONF_AUTH_CODE] @@ -102,7 +109,10 @@ class SimpliSafeFlowHandler(ConfigFlow, domain=DOMAIN): step_id="user", data_schema=STEP_USER_SCHEMA, errors={CONF_AUTH_CODE: "invalid_auth_code_length"}, - description_placeholders={CONF_URL: self._oauth_values.auth_url}, + description_placeholders={ + CONF_URL: self._oauth_values.auth_url, + CONF_DOCUMENTATION_URL: DOCUMENTATION_URL, + }, ) errors = {} @@ -124,7 +134,10 @@ class SimpliSafeFlowHandler(ConfigFlow, domain=DOMAIN): step_id="user", data_schema=STEP_USER_SCHEMA, errors=errors, - description_placeholders={CONF_URL: self._oauth_values.auth_url}, + description_placeholders={ + CONF_URL: self._oauth_values.auth_url, + CONF_DOCUMENTATION_URL: DOCUMENTATION_URL, + }, ) simplisafe_user_id = str(simplisafe.user_id) diff --git a/homeassistant/components/simplisafe/strings.json b/homeassistant/components/simplisafe/strings.json index 992160350809..1f12b1ed65f7 100644 --- a/homeassistant/components/simplisafe/strings.json +++ b/homeassistant/components/simplisafe/strings.json @@ -2,7 +2,7 @@ "config": { "step": { "user": { - "description": "SimpliSafe authenticates users via its web app. Due to technical limitations, there is a manual step at the end of this process; please ensure that you read the [documentation](http://home-assistant.io/integrations/simplisafe#getting-an-authorization-code) before starting.\n\nWhen you are ready, click [here]({url}) to open the SimpliSafe web app and input your credentials. If you've already logged into SimpliSafe in your browser, you may want to open a new tab, then copy/paste the above URL into that tab.\n\nWhen the process is complete, return here and input the authorization code from the `com.simplisafe.mobile` URL.", + "description": "SimpliSafe authenticates users via its web app. Due to technical limitations, there is a manual step at the end of this process; please ensure that you read the [documentation]({documentation_url}) before starting.\n\nWhen you are ready, click [here]({url}) to open the SimpliSafe web app and input your credentials. If you've already logged into SimpliSafe in your browser, you may want to open a new tab, then copy/paste the above URL into that tab.\n\nWhen the process is complete, return here and input the authorization code from the `com.simplisafe.mobile` URL.", "data": { "auth_code": "Authorization Code" }