From b35c1d852e28b22febcd11876702b7692d998f07 Mon Sep 17 00:00:00 2001
From: epenet <6771947+epenet@users.noreply.github.com>
Date: Sat, 19 Oct 2024 14:56:47 +0200
Subject: [PATCH] Use new reauth helpers in steam_online (#128746)

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

diff --git a/homeassistant/components/steam_online/config_flow.py b/homeassistant/components/steam_online/config_flow.py
index 4b99bf7738d..704eef616f6 100644
--- a/homeassistant/components/steam_online/config_flow.py
+++ b/homeassistant/components/steam_online/config_flow.py
@@ -36,10 +36,6 @@ def validate_input(user_input: dict[str, str]) -> dict[str, str | int]:
 class SteamFlowHandler(ConfigFlow, domain=DOMAIN):
     """Handle a config flow for Steam."""
 
-    def __init__(self) -> None:
-        """Initialize the flow."""
-        self.entry: SteamConfigEntry | None = None
-
     @staticmethod
     @callback
     def async_get_options_flow(
@@ -53,8 +49,8 @@ class SteamFlowHandler(ConfigFlow, domain=DOMAIN):
     ) -> ConfigFlowResult:
         """Handle a flow initiated by the user."""
         errors = {}
-        if user_input is None and self.entry:
-            user_input = {CONF_ACCOUNT: self.entry.data[CONF_ACCOUNT]}
+        if user_input is None and self.source == SOURCE_REAUTH:
+            user_input = {CONF_ACCOUNT: self._get_reauth_entry().data[CONF_ACCOUNT]}
         elif user_input is not None:
             try:
                 res = await self.hass.async_add_executor_job(validate_input, user_input)
@@ -102,8 +98,6 @@ class SteamFlowHandler(ConfigFlow, domain=DOMAIN):
         self, entry_data: Mapping[str, Any]
     ) -> ConfigFlowResult:
         """Handle a reauthorization flow request."""
-        self.entry = self.hass.config_entries.async_get_entry(self.context["entry_id"])
-
         return await self.async_step_reauth_confirm()
 
     async def async_step_reauth_confirm(
-- 
GitLab