From 825bce32b517d82d7e4972713eb6b9eba935db0d Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 1 Oct 2024 11:11:48 +0200 Subject: [PATCH] Store fully_kiosk flow data in flow handler attributes (#127172) --- homeassistant/components/fully_kiosk/config_flow.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/fully_kiosk/config_flow.py b/homeassistant/components/fully_kiosk/config_flow.py index 98cf96f637e..15771d12b5d 100644 --- a/homeassistant/components/fully_kiosk/config_flow.py +++ b/homeassistant/components/fully_kiosk/config_flow.py @@ -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] = {} @@ -135,15 +137,13 @@ class FullyKioskConfigFlow(ConfigFlow, domain=DOMAIN): """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( @@ -168,6 +168,6 @@ class FullyKioskConfigFlow(ConfigFlow, domain=DOMAIN): 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()