From 41932b4501f81d87fd35cacd886b3afbf24fb122 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 1 Oct 2024 14:32:40 +0200 Subject: [PATCH] Ensure soundtouch config flow title_placeholders items are [str, str] (#127207) --- homeassistant/components/soundtouch/config_flow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/soundtouch/config_flow.py b/homeassistant/components/soundtouch/config_flow.py index 7c637d71111..7e3fb2ca8c3 100644 --- a/homeassistant/components/soundtouch/config_flow.py +++ b/homeassistant/components/soundtouch/config_flow.py @@ -65,7 +65,9 @@ class SoundtouchConfigFlow(ConfigFlow, domain=DOMAIN): except RequestException: return self.async_abort(reason="cannot_connect") - self.context["title_placeholders"] = {"name": self.name} + if self.name: + # If we have a name, use it as flow title + self.context["title_placeholders"] = {"name": self.name} return await self.async_step_zeroconf_confirm() async def async_step_zeroconf_confirm(