1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-25 20:35:09 +00:00

Move URL out of system_bridge strings.json (#155067)

This commit is contained in:
MichaelMKKelly
2025-10-24 12:13:10 +01:00
committed by GitHub
parent b19070fa4b
commit 80c06c689c
3 changed files with 19 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.service_info.zeroconf import ZeroconfServiceInfo
from .const import DATA_WAIT_TIMEOUT, DOMAIN
from .const import DATA_WAIT_TIMEOUT, DOMAIN, SYNTAX_KEYS_DOCUMENTATION_URL
_LOGGER = logging.getLogger(__name__)
@@ -132,7 +132,11 @@ class SystemBridgeConfigFlow(
"""Handle the initial step."""
if user_input is None:
return self.async_show_form(
step_id="user", data_schema=STEP_USER_DATA_SCHEMA
step_id="user",
data_schema=STEP_USER_DATA_SCHEMA,
description_placeholders={
"syntax_keys_documentation_url": SYNTAX_KEYS_DOCUMENTATION_URL
},
)
errors, info = await _async_get_info(self.hass, user_input)
@@ -144,7 +148,12 @@ class SystemBridgeConfigFlow(
return self.async_create_entry(title=info["hostname"], data=user_input)
return self.async_show_form(
step_id="user", data_schema=STEP_USER_DATA_SCHEMA, errors=errors
step_id="user",
data_schema=STEP_USER_DATA_SCHEMA,
errors=errors,
description_placeholders={
"syntax_keys_documentation_url": SYNTAX_KEYS_DOCUMENTATION_URL
},
)
async def async_step_authenticate(
@@ -174,7 +183,10 @@ class SystemBridgeConfigFlow(
return self.async_show_form(
step_id="authenticate",
data_schema=STEP_AUTHENTICATE_DATA_SCHEMA,
description_placeholders={"name": self._name},
description_placeholders={
"name": self._name,
"syntax_keys_documentation_url": SYNTAX_KEYS_DOCUMENTATION_URL,
},
errors=errors,
)

View File

@@ -4,6 +4,8 @@ from typing import Final
from systembridgemodels.modules import Module
SYNTAX_KEYS_DOCUMENTATION_URL = "http://robotjs.io/docs/syntax#keys"
DOMAIN = "system_bridge"
MODULES: Final[list[Module]] = [

View File

@@ -194,7 +194,7 @@
},
"key": {
"name": "Key",
"description": "Key to press. List available here: http://robotjs.io/docs/syntax#keys."
"description": "Key to press. List available here: {syntax_keys_documentation_url}."
}
}
},