mirror of
https://github.com/home-assistant/core.git
synced 2026-08-29 10:21:09 -05:00
Add description to Lichess config flow (#180549)
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
"""Constants for the Lichess integration."""
|
||||
|
||||
DOMAIN = "lichess"
|
||||
|
||||
TOKEN_URL = "https://lichess.org/account/oauth/token"
|
||||
|
||||
@@ -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."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user