|
88 | 88 | CONF_ADDON_LR_S2_AUTHENTICATED_KEY: CONF_LR_S2_AUTHENTICATED_KEY, |
89 | 89 | } |
90 | 90 |
|
| 91 | +EXAMPLE_SERVER_URL = "ws://localhost:3000" |
91 | 92 | ON_SUPERVISOR_SCHEMA = vol.Schema({vol.Optional(CONF_USE_ADDON, default=True): bool}) |
92 | 93 | MIN_MIGRATION_SDK_VERSION = AwesomeVersion("6.61") |
93 | 94 |
|
94 | 95 | NETWORK_TYPE_NEW = "new" |
95 | 96 | NETWORK_TYPE_EXISTING = "existing" |
| 97 | +ZWAVE_JS_SERVER_INSTRUCTIONS = ( |
| 98 | + "https://www.home-assistant.io/integrations/zwave_js/" |
| 99 | + "#advanced-installation-instructions" |
| 100 | +) |
96 | 101 | ZWAVE_JS_UI_MIGRATION_INSTRUCTIONS = ( |
97 | 102 | "https://www.home-assistant.io/integrations/zwave_js/" |
98 | 103 | "#how-to-migrate-from-one-adapter-to-a-new-adapter-using-z-wave-js-ui" |
@@ -529,7 +534,12 @@ async def async_step_manual( |
529 | 534 | """Handle a manual configuration.""" |
530 | 535 | if user_input is None: |
531 | 536 | return self.async_show_form( |
532 | | - step_id="manual", data_schema=get_manual_schema({}) |
| 537 | + step_id="manual", |
| 538 | + data_schema=get_manual_schema({}), |
| 539 | + description_placeholders={ |
| 540 | + "example_server_url": EXAMPLE_SERVER_URL, |
| 541 | + "server_instructions": ZWAVE_JS_SERVER_INSTRUCTIONS, |
| 542 | + }, |
533 | 543 | ) |
534 | 544 |
|
535 | 545 | errors = {} |
@@ -558,7 +568,13 @@ async def async_step_manual( |
558 | 568 | return self._async_create_entry_from_vars() |
559 | 569 |
|
560 | 570 | return self.async_show_form( |
561 | | - step_id="manual", data_schema=get_manual_schema(user_input), errors=errors |
| 571 | + step_id="manual", |
| 572 | + data_schema=get_manual_schema(user_input), |
| 573 | + description_placeholders={ |
| 574 | + "example_server_url": EXAMPLE_SERVER_URL, |
| 575 | + "server_instructions": ZWAVE_JS_SERVER_INSTRUCTIONS, |
| 576 | + }, |
| 577 | + errors=errors, |
562 | 578 | ) |
563 | 579 |
|
564 | 580 | async def async_step_hassio( |
@@ -1016,6 +1032,10 @@ async def async_step_manual_reconfigure( |
1016 | 1032 | return self.async_show_form( |
1017 | 1033 | step_id="manual_reconfigure", |
1018 | 1034 | data_schema=get_manual_schema({CONF_URL: config_entry.data[CONF_URL]}), |
| 1035 | + description_placeholders={ |
| 1036 | + "example_server_url": EXAMPLE_SERVER_URL, |
| 1037 | + "server_instructions": ZWAVE_JS_SERVER_INSTRUCTIONS, |
| 1038 | + }, |
1019 | 1039 | ) |
1020 | 1040 |
|
1021 | 1041 | errors = {} |
@@ -1046,6 +1066,10 @@ async def async_step_manual_reconfigure( |
1046 | 1066 | return self.async_show_form( |
1047 | 1067 | step_id="manual_reconfigure", |
1048 | 1068 | data_schema=get_manual_schema(user_input), |
| 1069 | + description_placeholders={ |
| 1070 | + "example_server_url": EXAMPLE_SERVER_URL, |
| 1071 | + "server_instructions": ZWAVE_JS_SERVER_INSTRUCTIONS, |
| 1072 | + }, |
1049 | 1073 | errors=errors, |
1050 | 1074 | ) |
1051 | 1075 |
|
|
0 commit comments