From 4378a171b25cae34e48434afcab386e704c79286 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 22 Jan 2024 11:25:48 -1000 Subject: [PATCH] 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 --- homeassistant/components/yalexs_ble/config_flow.py | 4 +--- tests/components/yalexs_ble/test_config_flow.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/yalexs_ble/config_flow.py b/homeassistant/components/yalexs_ble/config_flow.py index 3a6d91c4f55..578519107cd 100644 --- a/homeassistant/components/yalexs_ble/config_flow.py +++ b/homeassistant/components/yalexs_ble/config_flow.py @@ -207,11 +207,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): 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} ) - await self.hass.config_entries.async_reload(reauth_entry.entry_id) - return self.async_abort(reason="reauth_successful") return self.async_show_form( step_id="reauth_validate", diff --git a/tests/components/yalexs_ble/test_config_flow.py b/tests/components/yalexs_ble/test_config_flow.py index 593b9a7a9d0..a8ce68a3209 100644 --- a/tests/components/yalexs_ble/test_config_flow.py +++ b/tests/components/yalexs_ble/test_config_flow.py @@ -958,7 +958,7 @@ async def test_reauth(hass: HomeAssistant) -> None: result2["flow_id"], { CONF_KEY: "2fd51b8621c6a139eaffbedcb846b60f", - CONF_SLOT: 66, + CONF_SLOT: 67, }, ) await hass.async_block_till_done()