From f0f924a0a2493d8b73f2a9562057c221ebb63a28 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 2 Oct 2024 14:31:19 +0200 Subject: [PATCH] Use _get_reconfigure_entry in holiday (#127295) --- homeassistant/components/holiday/config_flow.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/holiday/config_flow.py b/homeassistant/components/holiday/config_flow.py index 3247bf374a1..40345fd318c 100644 --- a/homeassistant/components/holiday/config_flow.py +++ b/homeassistant/components/holiday/config_flow.py @@ -28,7 +28,7 @@ class HolidayConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a config flow for Holiday.""" VERSION = 1 - config_entry: ConfigEntry | None + config_entry: ConfigEntry def __init__(self) -> None: """Initialize the config flow.""" @@ -116,17 +116,13 @@ class HolidayConfigFlow(ConfigFlow, domain=DOMAIN): self, entry_data: Mapping[str, Any] ) -> ConfigFlowResult: """Handle the re-configuration of a province.""" - self.config_entry = self.hass.config_entries.async_get_entry( - self.context["entry_id"] - ) + self.config_entry = self._get_reconfigure_entry() return await self.async_step_reconfigure_confirm() async def async_step_reconfigure_confirm( self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: """Handle the re-configuration of a province.""" - assert self.config_entry - if user_input is not None: combined_input: dict[str, Any] = {**self.config_entry.data, **user_input}