From dd083811678d1a312873cc3768cfa6f60b938f5c Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:07:48 +0200 Subject: [PATCH] Do not cache the reconfigure entry in google travel time config flow (#128002) --- .../components/google_travel_time/config_flow.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/google_travel_time/config_flow.py b/homeassistant/components/google_travel_time/config_flow.py index 9b59718c945..b7a26d3a4eb 100644 --- a/homeassistant/components/google_travel_time/config_flow.py +++ b/homeassistant/components/google_travel_time/config_flow.py @@ -207,8 +207,6 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN): VERSION = 1 - _context_entry: ConfigEntry - @staticmethod @callback def async_get_options_flow( @@ -240,7 +238,6 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN): self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration.""" - self._context_entry = self._get_reconfigure_entry() return await self.async_step_reconfigure_confirm() async def async_step_reconfigure_confirm( @@ -252,15 +249,13 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN): errors = await validate_input(self.hass, user_input) if not errors: return self.async_update_reload_and_abort( - self._context_entry, - data=user_input, - reason="reconfigure_successful", + self._get_reconfigure_entry(), data=user_input ) return self.async_show_form( step_id="reconfigure_confirm", data_schema=self.add_suggested_values_to_schema( - RECONFIGURE_SCHEMA, self._context_entry.data.copy() + RECONFIGURE_SCHEMA, self._get_reconfigure_entry().data ), errors=errors, )