From 5df447db91a07321684c46a8790c506efbff9ec5 Mon Sep 17 00:00:00 2001 From: Tom Scholten Date: Thu, 5 Sep 2024 20:54:40 +0200 Subject: [PATCH] Too early close --- custom_components/stromer/config_flow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/stromer/config_flow.py b/custom_components/stromer/config_flow.py index 9da2963..79acd04 100644 --- a/custom_components/stromer/config_flow.py +++ b/custom_components/stromer/config_flow.py @@ -36,11 +36,12 @@ async def validate_input(_: HomeAssistant, data: dict[str, Any]) -> dict: if not await stromer.stromer_connect(): raise InvalidAuth LOGGER.debug("Credentials validated successfully") - await stromer.stromer_disconnect() # All bikes information available all_bikes = await stromer.stromer_detect() + await stromer.stromer_disconnect() + return all_bikes