From ff1ea46c464460557b0695fbc30139b97bdfc37b Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:32:08 +0200 Subject: [PATCH] Do not cache the reconfigure entry in feedreader config flow (#127989) --- homeassistant/components/feedreader/config_flow.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/feedreader/config_flow.py b/homeassistant/components/feedreader/config_flow.py index 4555b08e4f4..8c61a2f339f 100644 --- a/homeassistant/components/feedreader/config_flow.py +++ b/homeassistant/components/feedreader/config_flow.py @@ -42,7 +42,6 @@ class FeedReaderConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a config flow.""" VERSION = 1 - _config_entry: ConfigEntry _max_entries: int | None = None @staticmethod @@ -124,17 +123,17 @@ class FeedReaderConfigFlow(ConfigFlow, domain=DOMAIN): self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" - self._config_entry = self._get_reconfigure_entry() return await self.async_step_reconfigure_confirm() async def async_step_reconfigure_confirm( self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle a reconfiguration flow initialized by the user.""" + reconfigure_entry = self._get_reconfigure_entry() if not user_input: return self.show_user_form( - user_input={**self._config_entry.data}, - description_placeholders={"name": self._config_entry.title}, + user_input={**reconfigure_entry.data}, + description_placeholders={"name": reconfigure_entry.title}, step_id="reconfigure_confirm", ) @@ -145,12 +144,12 @@ class FeedReaderConfigFlow(ConfigFlow, domain=DOMAIN): if isinstance(feed.bozo_exception, urllib.error.URLError): return self.show_user_form( user_input=user_input, - description_placeholders={"name": self._config_entry.title}, + description_placeholders={"name": reconfigure_entry.title}, step_id="reconfigure_confirm", errors={"base": "url_error"}, ) - self.hass.config_entries.async_update_entry(self._config_entry, data=user_input) + self.hass.config_entries.async_update_entry(reconfigure_entry, data=user_input) return self.async_abort(reason="reconfigure_successful")