From d0caf48fb5f49012e7aadc0f430b4615d1c031ec Mon Sep 17 00:00:00 2001 From: Kai Osterbrink Date: Wed, 4 Mar 2026 23:10:49 +0100 Subject: [PATCH] Update custom_components/aurora_solar/config_flow.py --- custom_components/aurora_solar/config_flow.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/custom_components/aurora_solar/config_flow.py b/custom_components/aurora_solar/config_flow.py index e69de29..98a2088 100644 --- a/custom_components/aurora_solar/config_flow.py +++ b/custom_components/aurora_solar/config_flow.py @@ -0,0 +1,19 @@ +class AuroraSolarConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): + async def async_step_user(self, user_input=None): + errors = {} + if user_input is not None: + return self.async_create_entry( + title=f"Aurora Wechselrichter {user_input[CONF_SLAVE_ID]}", + data=user_input + ) + + return self.async_show_form( + step_id="user", + data_schema=vol.Schema({ + vol.Required(CONF_HOST): str, + vol.Required(CONF_PORT, default=DEFAULT_PORT): int, + vol.Required(CONF_SLAVE_ID, default=DEFAULT_SLAVE_ID): int, + vol.Required("name"): str, + }), + errors=errors + )