mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Do not cache reconfigure entry in waze_travel_time config flow (#128030)
This commit is contained in:
parent
fcaec2c3f4
commit
577ae6923a
@ -142,8 +142,6 @@ class WazeConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
|
|
||||||
VERSION = 2
|
VERSION = 2
|
||||||
|
|
||||||
_entry: ConfigEntry
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@callback
|
@callback
|
||||||
def async_get_options_flow(
|
def async_get_options_flow(
|
||||||
@ -169,10 +167,9 @@ class WazeConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
):
|
):
|
||||||
if self.source == SOURCE_RECONFIGURE:
|
if self.source == SOURCE_RECONFIGURE:
|
||||||
return self.async_update_reload_and_abort(
|
return self.async_update_reload_and_abort(
|
||||||
self._entry,
|
self._get_reconfigure_entry(),
|
||||||
title=user_input[CONF_NAME],
|
title=user_input[CONF_NAME],
|
||||||
data=user_input,
|
data=user_input,
|
||||||
reason="reconfigure_successful",
|
|
||||||
)
|
)
|
||||||
return self.async_create_entry(
|
return self.async_create_entry(
|
||||||
title=user_input.get(CONF_NAME, DEFAULT_NAME),
|
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
|
self, user_input: dict[str, Any] | None = None
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Handle reconfiguration."""
|
"""Handle reconfiguration."""
|
||||||
self._entry = self._get_reconfigure_entry()
|
data = self._get_reconfigure_entry().data.copy()
|
||||||
|
|
||||||
data = self._entry.data.copy()
|
|
||||||
data[CONF_REGION] = data[CONF_REGION].lower()
|
data[CONF_REGION] = data[CONF_REGION].lower()
|
||||||
|
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user