From 1efe418e05578be9ef6f232e3e8fef31b9db6c76 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 1 Oct 2024 14:32:02 +0200 Subject: [PATCH] Avoid mutating title_placeholders in reolink (#127209) --- homeassistant/components/reolink/config_flow.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/reolink/config_flow.py b/homeassistant/components/reolink/config_flow.py index 489597e7764..bf84713336c 100644 --- a/homeassistant/components/reolink/config_flow.py +++ b/homeassistant/components/reolink/config_flow.py @@ -116,10 +116,12 @@ class ReolinkFlowHandler(ConfigFlow, domain=DOMAIN): self._host = entry_data[CONF_HOST] self._username = entry_data[CONF_USERNAME] self._password = entry_data[CONF_PASSWORD] - self.context["title_placeholders"]["ip_address"] = entry_data[CONF_HOST] - self.context["title_placeholders"]["hostname"] = self.context[ - "title_placeholders" - ]["name"] + placeholders = { + **self.context["title_placeholders"], + "ip_address": entry_data[CONF_HOST], + "hostname": self.context["title_placeholders"]["name"], + } + self.context["title_placeholders"] = placeholders return await self.async_step_reauth_confirm() async def async_step_reauth_confirm(