From d4a48cc41fdcf5fe7e1d368dbee4abaaca080f7c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 30 Aug 2026 11:51:02 +0200 Subject: [PATCH] Split the Plaato user flow init from its data (#180724) --- tests/components/plaato/test_config_flow.py | 27 ++++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/tests/components/plaato/test_config_flow.py b/tests/components/plaato/test_config_flow.py index f9edc7d355e0..589790cd9fd4 100644 --- a/tests/components/plaato/test_config_flow.py +++ b/tests/components/plaato/test_config_flow.py @@ -54,9 +54,15 @@ async def test_show_config_form(hass: HomeAssistant) -> None: async def test_show_config_form_device_type_airlock(hass: HomeAssistant) -> None: """Test show configuration form.""" result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": config_entries.SOURCE_USER}, - data={ + DOMAIN, context={"source": config_entries.SOURCE_USER} + ) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "user" + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + user_input={ CONF_DEVICE_TYPE: PlaatoDeviceType.Airlock, CONF_DEVICE_NAME: "device_name", }, @@ -71,9 +77,18 @@ async def test_show_config_form_device_type_airlock(hass: HomeAssistant) -> None async def test_show_config_form_device_type_keg(hass: HomeAssistant) -> None: """Test show configuration form.""" result = await hass.config_entries.flow.async_init( - DOMAIN, - context={"source": config_entries.SOURCE_USER}, - data={CONF_DEVICE_TYPE: PlaatoDeviceType.Keg, CONF_DEVICE_NAME: "device_name"}, + DOMAIN, context={"source": config_entries.SOURCE_USER} + ) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "user" + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + user_input={ + CONF_DEVICE_TYPE: PlaatoDeviceType.Keg, + CONF_DEVICE_NAME: "device_name", + }, ) assert result["type"] is FlowResultType.FORM