Ensure soundtouch config flow title_placeholders items are [str, str] (#127207)

This commit is contained in:
Erik Montnemery
2024-10-01 14:32:40 +02:00
committed by GitHub
parent 028d1c6148
commit 41932b4501

View File

@@ -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(