mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 06:05:10 +02:00
Direct migrations with Z-Wave JS UI to docs (#149966)
This commit is contained in:
@@ -93,6 +93,10 @@ MIN_MIGRATION_SDK_VERSION = AwesomeVersion("6.61")
|
||||
|
||||
NETWORK_TYPE_NEW = "new"
|
||||
NETWORK_TYPE_EXISTING = "existing"
|
||||
ZWAVE_JS_UI_MIGRATION_INSTRUCTIONS = (
|
||||
"https://www.home-assistant.io/integrations/zwave_js/"
|
||||
"#how-to-migrate-from-one-adapter-to-a-new-adapter-using-z-wave-js-ui"
|
||||
)
|
||||
|
||||
|
||||
def get_manual_schema(user_input: dict[str, Any]) -> vol.Schema:
|
||||
@@ -446,7 +450,12 @@ class ZWaveJSConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
None,
|
||||
)
|
||||
if not self._reconfigure_config_entry:
|
||||
return self.async_abort(reason="addon_required")
|
||||
return self.async_abort(
|
||||
reason="addon_required",
|
||||
description_placeholders={
|
||||
"zwave_js_ui_migration": ZWAVE_JS_UI_MIGRATION_INSTRUCTIONS,
|
||||
},
|
||||
)
|
||||
|
||||
vid = discovery_info.vid
|
||||
pid = discovery_info.pid
|
||||
@@ -890,7 +899,12 @@ class ZWaveJSConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
config_entry = self._reconfigure_config_entry
|
||||
assert config_entry is not None
|
||||
if not self._usb_discovery and not config_entry.data.get(CONF_USE_ADDON):
|
||||
return self.async_abort(reason="addon_required")
|
||||
return self.async_abort(
|
||||
reason="addon_required",
|
||||
description_placeholders={
|
||||
"zwave_js_ui_migration": ZWAVE_JS_UI_MIGRATION_INSTRUCTIONS,
|
||||
},
|
||||
)
|
||||
|
||||
try:
|
||||
driver = self._get_driver()
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"addon_get_discovery_info_failed": "Failed to get Z-Wave add-on discovery info.",
|
||||
"addon_info_failed": "Failed to get Z-Wave add-on info.",
|
||||
"addon_install_failed": "Failed to install the Z-Wave add-on.",
|
||||
"addon_required": "The Z-Wave migration flow requires the integration to be configured using the Z-Wave Supervisor add-on. You can still use the Backup and Restore buttons to migrate your network manually.",
|
||||
"addon_required": "The Z-Wave migration flow requires the integration to be configured using the Z-Wave Supervisor add-on. If you are using Z-Wave JS UI, please follow our [migration instructions]({zwave_js_ui_migration}).",
|
||||
"addon_set_config_failed": "Failed to set Z-Wave configuration.",
|
||||
"addon_start_failed": "Failed to start the Z-Wave add-on.",
|
||||
"addon_stop_failed": "Failed to stop the Z-Wave add-on.",
|
||||
|
Reference in New Issue
Block a user