mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Use _get_reconfigure_entry in holiday (#127295)
This commit is contained in:
parent
a19a069b21
commit
f0f924a0a2
@ -28,7 +28,7 @@ class HolidayConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
"""Handle a config flow for Holiday."""
|
"""Handle a config flow for Holiday."""
|
||||||
|
|
||||||
VERSION = 1
|
VERSION = 1
|
||||||
config_entry: ConfigEntry | None
|
config_entry: ConfigEntry
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
"""Initialize the config flow."""
|
"""Initialize the config flow."""
|
||||||
@ -116,17 +116,13 @@ class HolidayConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
self, entry_data: Mapping[str, Any]
|
self, entry_data: Mapping[str, Any]
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Handle the re-configuration of a province."""
|
"""Handle the re-configuration of a province."""
|
||||||
self.config_entry = self.hass.config_entries.async_get_entry(
|
self.config_entry = self._get_reconfigure_entry()
|
||||||
self.context["entry_id"]
|
|
||||||
)
|
|
||||||
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(
|
||||||
self, user_input: dict[str, Any] | None = None
|
self, user_input: dict[str, Any] | None = None
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Handle the re-configuration of a province."""
|
"""Handle the re-configuration of a province."""
|
||||||
assert self.config_entry
|
|
||||||
|
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
combined_input: dict[str, Any] = {**self.config_entry.data, **user_input}
|
combined_input: dict[str, Any] = {**self.config_entry.data, **user_input}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user