Do not cache reconfigure entry in waze_travel_time config flow (#128030)
This commit is contained in:
parent
fcaec2c3f4
commit
577ae6923a
1 changed files with 2 additions and 7 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue