mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix Z-Wave config flow forms (#144279)
This commit is contained in:
parent
e3ed9fac78
commit
1879b8c27f
@ -717,7 +717,9 @@ class ZWaveJSConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
data_schema = vol.Schema(schema)
|
||||
|
||||
return self.async_show_form(step_id="configure_addon", data_schema=data_schema)
|
||||
return self.async_show_form(
|
||||
step_id="configure_addon_user", data_schema=data_schema
|
||||
)
|
||||
|
||||
async def async_step_finish_addon_setup_user(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
@ -1097,7 +1099,9 @@ class ZWaveJSConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
}
|
||||
)
|
||||
|
||||
return self.async_show_form(step_id="configure_addon", data_schema=data_schema)
|
||||
return self.async_show_form(
|
||||
step_id="configure_addon_reconfigure", data_schema=data_schema
|
||||
)
|
||||
|
||||
async def async_step_choose_serial_port(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
|
@ -37,8 +37,10 @@
|
||||
"restore_nvm": "Please wait while the network restore completes."
|
||||
},
|
||||
"step": {
|
||||
"configure_addon": {
|
||||
"configure_addon_user": {
|
||||
"data": {
|
||||
"lr_s2_access_control_key": "Long Range S2 Access Control Key",
|
||||
"lr_s2_authenticated_key": "Long Range S2 Authenticated Key",
|
||||
"s0_legacy_key": "S0 Key (Legacy)",
|
||||
"s2_access_control_key": "S2 Access Control Key",
|
||||
"s2_authenticated_key": "S2 Authenticated Key",
|
||||
@ -52,14 +54,16 @@
|
||||
"data": {
|
||||
"emulate_hardware": "Emulate Hardware",
|
||||
"log_level": "Log level",
|
||||
"s0_legacy_key": "[%key:component::zwave_js::config::step::configure_addon::data::s0_legacy_key%]",
|
||||
"s2_access_control_key": "[%key:component::zwave_js::config::step::configure_addon::data::s2_access_control_key%]",
|
||||
"s2_authenticated_key": "[%key:component::zwave_js::config::step::configure_addon::data::s2_authenticated_key%]",
|
||||
"s2_unauthenticated_key": "[%key:component::zwave_js::config::step::configure_addon::data::s2_unauthenticated_key%]",
|
||||
"lr_s2_access_control_key": "[%key:component::zwave_js::config::step::configure_addon_user::data::lr_s2_access_control_key%]",
|
||||
"lr_s2_authenticated_key": "[%key:component::zwave_js::config::step::configure_addon_user::data::lr_s2_authenticated_key%]",
|
||||
"s0_legacy_key": "[%key:component::zwave_js::config::step::configure_addon_user::data::s0_legacy_key%]",
|
||||
"s2_access_control_key": "[%key:component::zwave_js::config::step::configure_addon_user::data::s2_access_control_key%]",
|
||||
"s2_authenticated_key": "[%key:component::zwave_js::config::step::configure_addon_user::data::s2_authenticated_key%]",
|
||||
"s2_unauthenticated_key": "[%key:component::zwave_js::config::step::configure_addon_user::data::s2_unauthenticated_key%]",
|
||||
"usb_path": "[%key:common::config_flow::data::usb_path%]"
|
||||
},
|
||||
"description": "[%key:component::zwave_js::config::step::configure_addon::description%]",
|
||||
"title": "[%key:component::zwave_js::config::step::configure_addon::title%]"
|
||||
"description": "[%key:component::zwave_js::config::step::configure_addon_user::description%]",
|
||||
"title": "[%key:component::zwave_js::config::step::configure_addon_user::title%]"
|
||||
},
|
||||
"hassio_confirm": {
|
||||
"description": "Do you want to set up the Z-Wave integration with the Z-Wave add-on?"
|
||||
|
@ -682,7 +682,7 @@ async def test_usb_discovery(
|
||||
assert install_addon.call_args == call("core_zwave_js")
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -783,7 +783,7 @@ async def test_usb_discovery_addon_not_running(
|
||||
result = await hass.config_entries.flow.async_configure(result["flow_id"], {})
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
# Make sure the discovered usb device is preferred.
|
||||
data_schema = result["data_schema"]
|
||||
@ -1015,7 +1015,7 @@ async def test_discovery_addon_not_running(
|
||||
result = await hass.config_entries.flow.async_configure(result["flow_id"], {})
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -1117,7 +1117,7 @@ async def test_discovery_addon_not_installed(
|
||||
assert install_addon.call_args == call("core_zwave_js")
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -1674,7 +1674,7 @@ async def test_addon_installed(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -1777,7 +1777,7 @@ async def test_addon_installed_start_failure(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -1862,7 +1862,7 @@ async def test_addon_installed_failures(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -1943,7 +1943,7 @@ async def test_addon_installed_set_options_failure(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -2058,7 +2058,7 @@ async def test_addon_installed_already_configured(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -2154,7 +2154,7 @@ async def test_addon_not_installed(
|
||||
assert install_addon.call_args == call("core_zwave_js")
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_user"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -2600,7 +2600,7 @@ async def test_reconfigure_addon_running(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_reconfigure"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -2735,7 +2735,7 @@ async def test_reconfigure_addon_running_no_changes(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_reconfigure"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -2916,7 +2916,7 @@ async def test_reconfigure_different_device(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_reconfigure"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -3099,7 +3099,7 @@ async def test_reconfigure_addon_restart_failed(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_reconfigure"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -3240,7 +3240,7 @@ async def test_reconfigure_addon_running_server_info_failure(
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_reconfigure"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
@ -3387,7 +3387,7 @@ async def test_reconfigure_addon_not_installed(
|
||||
assert install_addon.call_args == call("core_zwave_js")
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "configure_addon"
|
||||
assert result["step_id"] == "configure_addon_reconfigure"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user