From 0e46d604479eb9313faa44d57edb0565308c9f1e Mon Sep 17 00:00:00 2001 From: chilikla Date: Sat, 19 Oct 2024 23:12:19 +0300 Subject: [PATCH] fix: config flow form #10 --- custom_components/yerushamayim/config_flow.py | 7 +------ custom_components/yerushamayim/strings.json | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/custom_components/yerushamayim/config_flow.py b/custom_components/yerushamayim/config_flow.py index bf03d3e..4c3172a 100644 --- a/custom_components/yerushamayim/config_flow.py +++ b/custom_components/yerushamayim/config_flow.py @@ -11,11 +11,6 @@ from .const import DOMAIN -async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str, Any]: - """Validate the user input allows us to connect.""" - # TODO: Add any validation logic here if needed in the future - return {"title": "Yerushamayim Weather"} - class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): """Handle a config flow for Yerushamayim.""" @@ -27,7 +22,7 @@ async def async_step_user( """Handle the initial step.""" if self._async_current_entries(): return self.async_abort(reason="single_instance_allowed") - + await self.async_set_unique_id(DOMAIN) self._abort_if_unique_id_configured() diff --git a/custom_components/yerushamayim/strings.json b/custom_components/yerushamayim/strings.json index 67ef200..92b370c 100644 --- a/custom_components/yerushamayim/strings.json +++ b/custom_components/yerushamayim/strings.json @@ -1,6 +1,6 @@ { - "title": "Yerushamayim Weather", "config": { + "title": "Yerushamayim Weather", "step": { "user": { "title": "Add Yerushamayim Weather",