mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Drop reconfigure_confirm step in trafikverket_camera (#128031)
* Drop reconfigure_confirm step in trafikverket_camera * Update strings.json
This commit is contained in:
parent
9bbbb2cd3c
commit
39891ffe60
@ -94,12 +94,6 @@ class TVCameraConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
self, user_input: dict[str, Any] | None = None
|
self, user_input: dict[str, Any] | None = None
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Handle re-configuration with Trafikverket."""
|
"""Handle re-configuration with Trafikverket."""
|
||||||
return await self.async_step_reconfigure_confirm()
|
|
||||||
|
|
||||||
async def async_step_reconfigure_confirm(
|
|
||||||
self, user_input: dict[str, Any] | None = None
|
|
||||||
) -> ConfigFlowResult:
|
|
||||||
"""Confirm re-configuration with Trafikverket."""
|
|
||||||
errors: dict[str, str] = {}
|
errors: dict[str, str] = {}
|
||||||
reconfigure_entry = self._get_reconfigure_entry()
|
reconfigure_entry = self._get_reconfigure_entry()
|
||||||
|
|
||||||
@ -134,7 +128,7 @@ class TVCameraConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
step_id="reconfigure_confirm",
|
step_id="reconfigure",
|
||||||
data_schema=schema,
|
data_schema=schema,
|
||||||
errors=errors,
|
errors=errors,
|
||||||
)
|
)
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
"api_key": "[%key:common::config_flow::data::api_key%]"
|
"api_key": "[%key:common::config_flow::data::api_key%]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"reconfigure_confirm": {
|
"reconfigure": {
|
||||||
"data": {
|
"data": {
|
||||||
"api_key": "[%key:common::config_flow::data::api_key%]",
|
"api_key": "[%key:common::config_flow::data::api_key%]",
|
||||||
"location": "[%key:common::config_flow::data::location%]"
|
"location": "[%key:common::config_flow::data::location%]"
|
||||||
|
@ -329,7 +329,7 @@ async def test_reconfigure_flow(
|
|||||||
entry.add_to_hass(hass)
|
entry.add_to_hass(hass)
|
||||||
|
|
||||||
result = await entry.start_reconfigure_flow(hass)
|
result = await entry.start_reconfigure_flow(hass)
|
||||||
assert result["step_id"] == "reconfigure_confirm"
|
assert result["step_id"] == "reconfigure"
|
||||||
assert result["type"] is FlowResultType.FORM
|
assert result["type"] is FlowResultType.FORM
|
||||||
assert result["errors"] == {}
|
assert result["errors"] == {}
|
||||||
|
|
||||||
@ -427,7 +427,7 @@ async def test_reconfigure_flow_error(
|
|||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
assert result2["step_id"] == "reconfigure_confirm"
|
assert result2["step_id"] == "reconfigure"
|
||||||
assert result2["type"] is FlowResultType.FORM
|
assert result2["type"] is FlowResultType.FORM
|
||||||
assert result2["errors"] == {error_key: p_error}
|
assert result2["errors"] == {error_key: p_error}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user