Drop reconfigure_confirm step in trafikverket_camera (#128031)
* Drop reconfigure_confirm step in trafikverket_camera * Update strings.jsonpull/128074/head
parent
9bbbb2cd3c
commit
39891ffe60
|
@ -94,12 +94,6 @@ class TVCameraConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
self, user_input: dict[str, Any] | None = None
|
||||
) -> ConfigFlowResult:
|
||||
"""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] = {}
|
||||
reconfigure_entry = self._get_reconfigure_entry()
|
||||
|
||||
|
@ -134,7 +128,7 @@ class TVCameraConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
)
|
||||
|
||||
return self.async_show_form(
|
||||
step_id="reconfigure_confirm",
|
||||
step_id="reconfigure",
|
||||
data_schema=schema,
|
||||
errors=errors,
|
||||
)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"api_key": "[%key:common::config_flow::data::api_key%]"
|
||||
}
|
||||
},
|
||||
"reconfigure_confirm": {
|
||||
"reconfigure": {
|
||||
"data": {
|
||||
"api_key": "[%key:common::config_flow::data::api_key%]",
|
||||
"location": "[%key:common::config_flow::data::location%]"
|
||||
|
|
|
@ -329,7 +329,7 @@ async def test_reconfigure_flow(
|
|||
entry.add_to_hass(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["errors"] == {}
|
||||
|
||||
|
@ -427,7 +427,7 @@ async def test_reconfigure_flow_error(
|
|||
)
|
||||
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["errors"] == {error_key: p_error}
|
||||
|
||||
|
|
Loading…
Reference in New Issue