Skip to content

Commit 49bfb01

Browse files
tr4nt0rfrenck
authored andcommitted
Add description placeholders in Uptime Kuma config flow (home-assistant#154252)
Signed-off-by: tr4nt0r <[email protected]>
1 parent ad8f7fd commit 49bfb01

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

homeassistant/components/uptime_kuma/config_flow.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
}
4343
)
4444
STEP_REAUTH_DATA_SCHEMA = vol.Schema({vol.Optional(CONF_API_KEY, default=""): str})
45+
PLACEHOLDER = {"example_url": "https://uptime.example.com:3001"}
4546

4647

4748
async def validate_connection(
@@ -100,6 +101,7 @@ async def async_step_user(
100101
data_schema=STEP_USER_DATA_SCHEMA, suggested_values=user_input
101102
),
102103
errors=errors,
104+
description_placeholders=PLACEHOLDER,
103105
)
104106

105107
async def async_step_reauth(
@@ -170,6 +172,7 @@ async def async_step_reconfigure(
170172
suggested_values=user_input or entry.data,
171173
),
172174
errors=errors,
175+
description_placeholders=PLACEHOLDER,
173176
)
174177

175178
async def async_step_hassio(

homeassistant/components/uptime_kuma/strings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"api_key": "[%key:common::config_flow::data::api_key%]"
1010
},
1111
"data_description": {
12-
"url": "Enter the full URL of your Uptime Kuma instance. Be sure to include the protocol (`http` or `https`), the hostname or IP address, the port number (if it is a non-default port), and any path prefix if applicable. Example: `https://uptime.example.com`",
12+
"url": "Enter the full URL of your Uptime Kuma instance. Be sure to include the protocol (`http` or `https`), the hostname or IP address, the port number (if it is a non-default port), and any path prefix if applicable. Example: `{example_url}`",
1313
"verify_ssl": "Enable SSL certificate verification for secure connections. Disable only if connecting to an Uptime Kuma instance using a self-signed certificate or via IP address",
1414
"api_key": "Enter an API key. To create a new API key navigate to **Settings → API Keys** and select **Add API Key**"
1515
}

0 commit comments

Comments
 (0)