Skip to content
Snippets Groups Projects
Unverified Commit dd083811 authored by epenet's avatar epenet Committed by GitHub
Browse files

Do not cache the reconfigure entry in google travel time config flow (#128002)

parent c096cc23
Branches
Tags
No related merge requests found
...@@ -207,8 +207,6 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN): ...@@ -207,8 +207,6 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN):
VERSION = 1 VERSION = 1
_context_entry: ConfigEntry
@staticmethod @staticmethod
@callback @callback
def async_get_options_flow( def async_get_options_flow(
...@@ -240,7 +238,6 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN): ...@@ -240,7 +238,6 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN):
self, user_input: dict[str, Any] | None = None self, user_input: dict[str, Any] | None = None
) -> ConfigFlowResult: ) -> ConfigFlowResult:
"""Handle reconfiguration.""" """Handle reconfiguration."""
self._context_entry = self._get_reconfigure_entry()
return await self.async_step_reconfigure_confirm() return await self.async_step_reconfigure_confirm()
async def async_step_reconfigure_confirm( async def async_step_reconfigure_confirm(
...@@ -252,15 +249,13 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN): ...@@ -252,15 +249,13 @@ class GoogleTravelTimeConfigFlow(ConfigFlow, domain=DOMAIN):
errors = await validate_input(self.hass, user_input) errors = await validate_input(self.hass, user_input)
if not errors: if not errors:
return self.async_update_reload_and_abort( return self.async_update_reload_and_abort(
self._context_entry, self._get_reconfigure_entry(), data=user_input
data=user_input,
reason="reconfigure_successful",
) )
return self.async_show_form( return self.async_show_form(
step_id="reconfigure_confirm", step_id="reconfigure_confirm",
data_schema=self.add_suggested_values_to_schema( data_schema=self.add_suggested_values_to_schema(
RECONFIGURE_SCHEMA, self._context_entry.data.copy() RECONFIGURE_SCHEMA, self._get_reconfigure_entry().data
), ),
errors=errors, errors=errors,
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment