diff --git a/homeassistant/components/lichess/config_flow.py b/homeassistant/components/lichess/config_flow.py index 2a51f5e6264b..333408188661 100644 --- a/homeassistant/components/lichess/config_flow.py +++ b/homeassistant/components/lichess/config_flow.py @@ -11,7 +11,7 @@ from homeassistant.config_entries import ConfigFlow, ConfigFlowResult from homeassistant.const import CONF_API_TOKEN from homeassistant.helpers.aiohttp_client import async_get_clientsession -from .const import DOMAIN +from .const import DOMAIN, TOKEN_URL _LOGGER = logging.getLogger(__name__) @@ -47,5 +47,6 @@ class LichessConfigFlow(ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="user", data_schema=vol.Schema({vol.Required(CONF_API_TOKEN): str}), + description_placeholders={"token_url": TOKEN_URL}, errors=errors, ) diff --git a/homeassistant/components/lichess/const.py b/homeassistant/components/lichess/const.py index 26b116653e47..560ecf56eb3d 100644 --- a/homeassistant/components/lichess/const.py +++ b/homeassistant/components/lichess/const.py @@ -1,3 +1,5 @@ """Constants for the Lichess integration.""" DOMAIN = "lichess" + +TOKEN_URL = "https://lichess.org/account/oauth/token" diff --git a/homeassistant/components/lichess/strings.json b/homeassistant/components/lichess/strings.json index 73c30f364fee..c9d810394095 100644 --- a/homeassistant/components/lichess/strings.json +++ b/homeassistant/components/lichess/strings.json @@ -15,7 +15,8 @@ }, "data_description": { "api_token": "The Lichess API token of the player." - } + }, + "description": "Create a personal API token on the [Lichess API token page]({token_url}). Make sure the **Read preferences** permission is allowed." } } },