Update strings in tailscale (#124143)

This commit is contained in:
civita 2024-09-24 13:12:24 -07:00 committed by GitHub
parent 5e2955845a
commit c53a760ba3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -15,6 +15,8 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
from .const import CONF_TAILNET, DOMAIN 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: async def validate_input(hass: HomeAssistant, *, tailnet: str, api_key: str) -> None:
"""Try using the give tailnet & api key against the Tailscale API.""" """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( return self.async_show_form(
step_id="user", step_id="user",
description_placeholders={ description_placeholders={"authkeys_url": AUTHKEYS_URL},
"authkeys_url": "https://login.tailscale.com/admin/settings/authkeys"
},
data_schema=vol.Schema( data_schema=vol.Schema(
{ {
vol.Required( vol.Required(
@ -123,6 +123,7 @@ class TailscaleFlowHandler(ConfigFlow, domain=DOMAIN):
return self.async_show_form( return self.async_show_form(
step_id="reauth_confirm", step_id="reauth_confirm",
description_placeholders={"authkeys_url": AUTHKEYS_URL},
data_schema=vol.Schema({vol.Required(CONF_API_KEY): str}), data_schema=vol.Schema({vol.Required(CONF_API_KEY): str}),
errors=errors, errors=errors,
) )

View File

@ -2,14 +2,14 @@
"config": { "config": {
"step": { "step": {
"user": { "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": { "data": {
"tailnet": "Tailnet", "tailnet": "Tailnet",
"api_key": "[%key:common::config_flow::data::api_key%]" "api_key": "[%key:common::config_flow::data::api_key%]"
} }
}, },
"reauth_confirm": { "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": { "data": {
"api_key": "[%key:common::config_flow::data::api_key%]" "api_key": "[%key:common::config_flow::data::api_key%]"
} }