Skip to content

Commit 1f03169

Browse files
sonianuj287frenck
authored andcommitted
Move translatable URLs out of strings.json for isy994 (home-assistant#154464)
1 parent fb27921 commit 1f03169

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

homeassistant/components/isy994/config_flow.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ async def async_step_user(
177177
step_id="user",
178178
data_schema=_data_schema(self.discovered_conf),
179179
errors=errors,
180+
description_placeholders={
181+
"sample_ip": "http://192.168.10.100:80",
182+
},
180183
)
181184

182185
async def _async_set_unique_id_or_update(
@@ -302,7 +305,10 @@ async def async_step_reauth_confirm(
302305
CONF_HOST: existing_data[CONF_HOST],
303306
}
304307
return self.async_show_form(
305-
description_placeholders={CONF_HOST: existing_data[CONF_HOST]},
308+
description_placeholders={
309+
CONF_HOST: existing_data[CONF_HOST],
310+
"sample_ip": "http://192.168.10.100:80",
311+
},
306312
step_id="reauth_confirm",
307313
data_schema=vol.Schema(
308314
{
@@ -347,7 +353,13 @@ async def async_step_init(
347353
}
348354
)
349355

350-
return self.async_show_form(step_id="init", data_schema=options_schema)
356+
return self.async_show_form(
357+
step_id="init",
358+
data_schema=options_schema,
359+
description_placeholders={
360+
"sample_ip": "http://192.168.10.100:80",
361+
},
362+
)
351363

352364

353365
class InvalidHost(HomeAssistantError):

homeassistant/components/isy994/strings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"password": "[%key:common::config_flow::data::password%]",
1010
"tls": "The TLS version of the ISY controller."
1111
},
12-
"description": "The host entry must be in full URL format, e.g., http://192.168.10.100:80",
12+
"description": "The host entry must be in full URL format, e.g., {sample_ip}",
1313
"title": "Connect to your ISY"
1414
},
1515
"reauth_confirm": {
@@ -26,7 +26,7 @@
2626
"unknown": "[%key:common::config_flow::error::unknown%]",
2727
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
2828
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
29-
"invalid_host": "The host entry was not in full URL format, e.g., http://192.168.10.100:80"
29+
"invalid_host": "The host entry was not in full URL format, e.g., {sample_ip}"
3030
},
3131
"abort": {
3232
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",

0 commit comments

Comments
 (0)