Ensure lookin config flow title_placeholders items are [str, str] (#127200)

pull/127292/head
Erik Montnemery 2024-10-02 13:05:08 +02:00 committed by GitHub
parent b8a00bfbfb
commit 4c1863d318
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 5 deletions

View File

@ -47,7 +47,10 @@ class LookinFlowHandler(ConfigFlow, domain=DOMAIN):
self._name = device.name self._name = device.name
self._host = host self._host = host
self._set_confirm_only() self._set_confirm_only()
self.context["title_placeholders"] = {"name": self._name, "host": host} self.context["title_placeholders"] = {
"name": self._name or "LOOKin",
"host": host,
}
return await self.async_step_discovery_confirm() return await self.async_step_discovery_confirm()
async def async_step_user( async def async_step_user(
@ -92,10 +95,6 @@ class LookinFlowHandler(ConfigFlow, domain=DOMAIN):
"""Confirm the discover flow.""" """Confirm the discover flow."""
assert self._host is not None assert self._host is not None
if user_input is None: if user_input is None:
self.context["title_placeholders"] = {
"name": self._name,
"host": self._host,
}
return self.async_show_form( return self.async_show_form(
step_id="discovery_confirm", step_id="discovery_confirm",
description_placeholders={"name": self._name, "host": self._host}, description_placeholders={"name": self._name, "host": self._host},