diff --git a/homeassistant/components/tailscale/config_flow.py b/homeassistant/components/tailscale/config_flow.py index ef70ed0afcc..c5888e64f71 100644 --- a/homeassistant/components/tailscale/config_flow.py +++ b/homeassistant/components/tailscale/config_flow.py @@ -15,6 +15,8 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession from .const import CONF_TAILNET, DOMAIN +AUTHKEYS_URL = "https://login.tailscale.com/admin/settings/keys" + async def validate_input(hass: HomeAssistant, *, tailnet: str, api_key: str) -> None: """Try using the give tailnet & api key against the Tailscale API.""" @@ -66,9 +68,7 @@ class TailscaleFlowHandler(ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="user", - description_placeholders={ - "authkeys_url": "https://login.tailscale.com/admin/settings/authkeys" - }, + description_placeholders={"authkeys_url": AUTHKEYS_URL}, data_schema=vol.Schema( { vol.Required( @@ -123,6 +123,7 @@ class TailscaleFlowHandler(ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="reauth_confirm", + description_placeholders={"authkeys_url": AUTHKEYS_URL}, data_schema=vol.Schema({vol.Required(CONF_API_KEY): str}), errors=errors, ) diff --git a/homeassistant/components/tailscale/strings.json b/homeassistant/components/tailscale/strings.json index 8d7fcc0c87b..89a1d4554b2 100644 --- a/homeassistant/components/tailscale/strings.json +++ b/homeassistant/components/tailscale/strings.json @@ -2,14 +2,14 @@ "config": { "step": { "user": { - "description": "This integration monitors your Tailscale network, it **DOES NOT** make your Home Assistant accessible via Tailscale VPN. \n\nTo authenticate with Tailscale you'll need to create an API key at {authkeys_url}.\n\nA Tailnet is the name of your Tailscale network. You can find it in the top left corner in the Tailscale Admin Panel (beside the Tailscale logo).", + "description": "This integration monitors your Tailscale network, it **DOES NOT** make your Home Assistant accessible via Tailscale VPN. \n\nTo authenticate with Tailscale you'll need to create an API access token at {authkeys_url}.\n\nA Tailnet is the name of your Tailscale network. You can find it in the top left corner in the Tailscale Admin Panel (beside the Tailscale logo).", "data": { "tailnet": "Tailnet", "api_key": "[%key:common::config_flow::data::api_key%]" } }, "reauth_confirm": { - "description": "Tailscale API tokens are valid for 90-days. You can create a fresh Tailscale API key at https://login.tailscale.com/admin/settings/authkeys.", + "description": "Tailscale API access tokens are valid for 90-days. You can create a fresh Tailscale API access token at {authkeys_url}.", "data": { "api_key": "[%key:common::config_flow::data::api_key%]" }