Skip to content

Commit

Permalink
fix: config flow form #10
Browse files Browse the repository at this point in the history
  • Loading branch information
chilikla authored Oct 19, 2024
1 parent 2be4952 commit 0e46d60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions custom_components/yerushamayim/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand All @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion custom_components/yerushamayim/strings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Yerushamayim Weather",
"config": {
"title": "Yerushamayim Weather",
"step": {
"user": {
"title": "Add Yerushamayim Weather",
Expand Down

0 comments on commit 0e46d60

Please sign in to comment.