Skip to content

Commit

Permalink
Store fully_kiosk flow data in flow handler attributes (home-assistan…
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery authored Oct 1, 2024
1 parent 36df9e0 commit 825bce3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions homeassistant/components/fully_kiosk/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class FullyKioskConfigFlow(ConfigFlow, domain=DOMAIN):

VERSION = 1

host: str

def __init__(self) -> None:
"""Initialize the config flow."""
self._discovered_device_info: dict[str, Any] = {}
Expand Down Expand Up @@ -135,15 +137,13 @@ async def async_step_discovery_confirm(
"""Confirm discovery."""
errors: dict[str, str] = {}
if user_input is not None:
result = await self._create_entry(
self.context[CONF_HOST], user_input, errors
)
result = await self._create_entry(self.host, user_input, errors)
if result:
return result

placeholders = {
"name": self._discovered_device_info["deviceName"],
CONF_HOST: self.context[CONF_HOST],
CONF_HOST: self.host,
}
self.context["title_placeholders"] = placeholders
return self.async_show_form(
Expand All @@ -168,6 +168,6 @@ async def async_step_mqtt(
await self.async_set_unique_id(device_id)
self._abort_if_unique_id_configured()

self.context[CONF_HOST] = device_info["hostname4"]
self.host = device_info["hostname4"]
self._discovered_device_info = device_info
return await self.async_step_discovery_confirm()

0 comments on commit 825bce3

Please sign in to comment.