Remove unneeded step from reauth in Reolink (#132143)

This commit is contained in:
starkillerOG 2024-12-03 09:11:44 +01:00 committed by GitHub
parent 101bb091ba
commit bb7dc079ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 19 deletions

View File

@ -128,13 +128,8 @@ class ReolinkFlowHandler(ConfigFlow, domain=DOMAIN):
async def async_step_reauth_confirm( async def async_step_reauth_confirm(
self, user_input: dict[str, Any] | None = None self, user_input: dict[str, Any] | None = None
) -> ConfigFlowResult: ) -> ConfigFlowResult:
"""Dialog that informs the user that reauth is required.""" """Perform a reauthentication."""
if user_input is not None: return await self.async_step_user()
return await self.async_step_user()
placeholders = {"name": self.context["title_placeholders"]["name"]}
return self.async_show_form(
step_id="reauth_confirm", description_placeholders=placeholders
)
async def async_step_reconfigure( async def async_step_reconfigure(
self, user_input: dict[str, Any] | None = None self, user_input: dict[str, Any] | None = None

View File

@ -18,10 +18,6 @@
"username": "Username to login to the Reolink device itself. Not the Reolink cloud account.", "username": "Username to login to the Reolink device itself. Not the Reolink cloud account.",
"password": "Password to login to the Reolink device itself. Not the Reolink cloud account." "password": "Password to login to the Reolink device itself. Not the Reolink cloud account."
} }
},
"reauth_confirm": {
"title": "[%key:common::config_flow::title::reauth%]",
"description": "The Reolink integration needs to re-authenticate your connection details"
} }
}, },
"error": { "error": {

View File

@ -310,14 +310,6 @@ async def test_reauth(hass: HomeAssistant, mock_setup_entry: MagicMock) -> None:
result = await config_entry.start_reauth_flow(hass) result = await config_entry.start_reauth_flow(hass)
assert result["type"] is FlowResultType.FORM
assert result["step_id"] == "reauth_confirm"
result = await hass.config_entries.flow.async_configure(
result["flow_id"],
{},
)
assert result["type"] is FlowResultType.FORM assert result["type"] is FlowResultType.FORM
assert result["step_id"] == "user" assert result["step_id"] == "user"
assert result["errors"] == {} assert result["errors"] == {}