Skip to content

Commit 7f1989f

Browse files
sonianuj287joostlek
authored andcommitted
Move translatable URLs out of strings.json for huawei lte (home-assistant#154368)
Co-authored-by: Joost Lekkerkerker <[email protected]>
1 parent 97e338c commit 7f1989f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

homeassistant/components/huawei_lte/config_flow.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ async def _async_show_user_form(
112112
}
113113
),
114114
errors=errors or {},
115+
description_placeholders={
116+
"sample_ip": "http://192.168.X.1",
117+
},
115118
)
116119

117120
async def _async_show_reauth_form(
@@ -132,6 +135,9 @@ async def _async_show_reauth_form(
132135
}
133136
),
134137
errors=errors or {},
138+
description_placeholders={
139+
"sample_ip": "http://192.168.X.1",
140+
},
135141
)
136142

137143
async def _connect(
@@ -406,4 +412,10 @@ async def async_step_init(
406412
): bool,
407413
}
408414
)
409-
return self.async_show_form(step_id="init", data_schema=data_schema)
415+
return self.async_show_form(
416+
step_id="init",
417+
data_schema=data_schema,
418+
description_placeholders={
419+
"sample_ip": "http://192.168.X.1",
420+
},
421+
)

homeassistant/components/huawei_lte/strings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242
"data_description": {
4343
"password": "Password for accessing the router's API. Typically, the same as the one used for the router's web interface.",
44-
"url": "Base URL to the API of the router. Typically, something like `http://192.168.X.1`. This is the beginning of the location shown in a browser when accessing the router's web interface.",
44+
"url": "Base URL to the API of the router. Typically, something like `{sample_ip}`. This is the beginning of the location shown in a browser when accessing the router's web interface.",
4545
"username": "Username for accessing the router's API. Typically, the same as the one used for the router's web interface. Usually, either `admin`, or left empty (recommended if that works).",
4646
"verify_ssl": "Whether to verify the SSL certificate of the router when accessing it. Applicable only if the router is accessed via HTTPS."
4747
},

0 commit comments

Comments
 (0)