Skip to content

Commit 8165ac1

Browse files
Move url out of nightscout strings and change to field descriptions (#154812)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 41c9524 commit 8165ac1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

homeassistant/components/nightscout/config_flow.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ async def async_step_user(
6363
return self.async_create_entry(title=info["title"], data=user_input)
6464

6565
return self.async_show_form(
66-
step_id="user", data_schema=DATA_SCHEMA, errors=errors
66+
step_id="user",
67+
data_schema=DATA_SCHEMA,
68+
errors=errors,
69+
description_placeholders={
70+
"example_url": "https://myhomeassistant.duckdns.org:5423",
71+
},
6772
)
6873

6974

homeassistant/components/nightscout/strings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
"step": {
44
"user": {
55
"title": "Enter your Nightscout server information.",
6-
"description": "- URL: the address of your nightscout instance. I.e.: https://myhomeassistant.duckdns.org:5423\n- API Key (optional): Only use if your instance is protected (auth_default_roles != readable).",
76
"data": {
87
"url": "[%key:common::config_flow::data::url%]",
98
"api_key": "[%key:common::config_flow::data::api_key%]"
9+
},
10+
"data_description": {
11+
"url": "The address of your Nightscout instance. For example: {example_url}.",
12+
"api_key": "Optional; only use it if your instance is protected (auth_default_roles != readable)."
1013
}
1114
}
1215
},

0 commit comments

Comments
 (0)