Do not cache the reconfigure entry in google travel time config flow (#128002)
This commit is contained in:
parent
c096cc23df
commit
dd08381167
1 changed files with 2 additions and 7 deletions
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue