mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Update strings in tailscale (#124143)
This commit is contained in:
parent
5e2955845a
commit
c53a760ba3
@ -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,
|
||||||
)
|
)
|
||||||
|
@ -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%]"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user