Assign docs URL to a placeholder in SimpliSafe config flow (#61410)
This commit is contained in:
parent
1f97603f71
commit
58174eaa4e
3 changed files with 11 additions and 3 deletions
|
@ -23,6 +23,11 @@ from homeassistant.helpers.typing import ConfigType
|
|||
from .const import CONF_USER_ID, DOMAIN, LOGGER
|
||||
|
||||
CONF_AUTH_CODE = "auth_code"
|
||||
CONF_DOCS_URL = "docs_url"
|
||||
|
||||
AUTH_DOCS_URL = (
|
||||
"http://home-assistant.io/integrations/simplisafe#getting-an-authorization-code"
|
||||
)
|
||||
|
||||
STEP_USER_SCHEMA = vol.Schema(
|
||||
{
|
||||
|
@ -74,7 +79,10 @@ class SimpliSafeFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
step_id="user",
|
||||
data_schema=STEP_USER_SCHEMA,
|
||||
errors=errors or {},
|
||||
description_placeholders={CONF_URL: self._oauth_values.auth_url},
|
||||
description_placeholders={
|
||||
CONF_URL: self._oauth_values.auth_url,
|
||||
CONF_DOCS_URL: AUTH_DOCS_URL,
|
||||
},
|
||||
)
|
||||
|
||||
async def async_step_reauth(self, config: ConfigType) -> FlowResult:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"config": {
|
||||
"step": {
|
||||
"user": {
|
||||
"description": "Starting in 2021, SimpliSafe has moved to a new authentication mechanism 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\n1. Click [here]({url}) to open the SimpliSafe web app and input your credentials.\n\n2. When the login process is complete, return here and input the authorization code below.",
|
||||
"description": "SimpliSafe authenticates with Home Assistant via the SimpliSafe web app. Due to technical limitations, there is a manual step at the end of this process; please ensure that you read the [documentation]({docs_url}) before starting.\n\n1. Click [here]({url}) to open the SimpliSafe web app and input your credentials.\n\n2. When the login process is complete, return here and input the authorization code below.",
|
||||
"data": {
|
||||
"auth_code": "Authorization Code"
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"data": {
|
||||
"auth_code": "Authorization Code"
|
||||
},
|
||||
"description": "Starting in 2021, SimpliSafe has moved to a new authentication mechanism 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\n1. Click [here]({url}) to open the SimpliSafe web app and input your credentials.\n\n2. When the login process is complete, return here and input the authorization code below."
|
||||
"description": "SimpliSafe authenticates with Home Assistant via the SimpliSafe web app. Due to technical limitations, there is a manual step at the end of this process; please ensure that you read the [documentation]({docs_url}) before starting.\n\n1. Click [here]({url}) to open the SimpliSafe web app and input your credentials.\n\n2. When the login process is complete, return here and input the authorization code below."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue