From 829af754164a310cf5f11c7a70fd5aeb182c4968 Mon Sep 17 00:00:00 2001
From: epenet <6771947+epenet@users.noreply.github.com>
Date: Wed, 2 Oct 2024 19:36:32 +0200
Subject: [PATCH] Use _get_reauth_entry in bring config flow (#127325)

---
 homeassistant/components/bring/config_flow.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/homeassistant/components/bring/config_flow.py b/homeassistant/components/bring/config_flow.py
index 6a90ff153e5..606c280cf8d 100644
--- a/homeassistant/components/bring/config_flow.py
+++ b/homeassistant/components/bring/config_flow.py
@@ -50,7 +50,7 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
     """Handle a config flow for Bring!."""
 
     VERSION = 1
-    reauth_entry: BringConfigEntry | None = None
+    reauth_entry: BringConfigEntry
     info: BringAuthResponse
 
     async def async_step_user(
@@ -74,9 +74,7 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
         self, entry_data: Mapping[str, Any]
     ) -> ConfigFlowResult:
         """Perform reauth upon an API authentication error."""
-        self.reauth_entry = self.hass.config_entries.async_get_entry(
-            self.context["entry_id"]
-        )
+        self.reauth_entry = self._get_reauth_entry()
         return await self.async_step_reauth_confirm()
 
     async def async_step_reauth_confirm(
@@ -85,8 +83,6 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
         """Dialog that informs the user that reauth is required."""
         errors: dict[str, str] = {}
 
-        assert self.reauth_entry
-
         if user_input is not None:
             if not (errors := await self.validate_input(user_input)):
                 return self.async_update_reload_and_abort(
-- 
GitLab