Use new config entry update/abort helper in yalexs_ble (#108675)

Use new config entry update/abort helper in yalexs_ble

uses the new helper from https://github.com/home-assistant/core/pull/108034
pull/108688/head
J. Nick Koston 2024-01-22 11:25:48 -10:00 committed by GitHub
parent bd7eb01546
commit 4378a171b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -207,11 +207,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
user_input[CONF_SLOT], user_input[CONF_SLOT],
) )
): ):
self.hass.config_entries.async_update_entry( return self.async_update_reload_and_abort(
reauth_entry, data={**reauth_entry.data, **user_input} reauth_entry, data={**reauth_entry.data, **user_input}
) )
await self.hass.config_entries.async_reload(reauth_entry.entry_id)
return self.async_abort(reason="reauth_successful")
return self.async_show_form( return self.async_show_form(
step_id="reauth_validate", step_id="reauth_validate",

View File

@ -958,7 +958,7 @@ async def test_reauth(hass: HomeAssistant) -> None:
result2["flow_id"], result2["flow_id"],
{ {
CONF_KEY: "2fd51b8621c6a139eaffbedcb846b60f", CONF_KEY: "2fd51b8621c6a139eaffbedcb846b60f",
CONF_SLOT: 66, CONF_SLOT: 67,
}, },
) )
await hass.async_block_till_done() await hass.async_block_till_done()