From 577ae6923a4068895efeef7677b0a77e40c9501d Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:31:11 +0200 Subject: [PATCH] Do not cache reconfigure entry in waze_travel_time config flow (#128030) --- homeassistant/components/waze_travel_time/config_flow.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/waze_travel_time/config_flow.py b/homeassistant/components/waze_travel_time/config_flow.py index 9738ec4465f..1d75adc6c29 100644 --- a/homeassistant/components/waze_travel_time/config_flow.py +++ b/homeassistant/components/waze_travel_time/config_flow.py @@ -142,8 +142,6 @@ class WazeConfigFlow(ConfigFlow, domain=DOMAIN): VERSION = 2 - _entry: ConfigEntry - @staticmethod @callback def async_get_options_flow( @@ -169,10 +167,9 @@ class WazeConfigFlow(ConfigFlow, domain=DOMAIN): ): if self.source == SOURCE_RECONFIGURE: return self.async_update_reload_and_abort( - self._entry, + self._get_reconfigure_entry(), title=user_input[CONF_NAME], data=user_input, - reason="reconfigure_successful", ) return self.async_create_entry( title=user_input.get(CONF_NAME, DEFAULT_NAME), @@ -194,9 +191,7 @@ class WazeConfigFlow(ConfigFlow, domain=DOMAIN): self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle reconfiguration.""" - self._entry = self._get_reconfigure_entry() - - data = self._entry.data.copy() + data = self._get_reconfigure_entry().data.copy() data[CONF_REGION] = data[CONF_REGION].lower() return self.async_show_form(