Skip to content

Commit

Permalink
fix: config flow form #5
Browse files Browse the repository at this point in the history
  • Loading branch information
chilikla authored Oct 19, 2024
1 parent 726d6c7 commit db11a8a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
10 changes: 9 additions & 1 deletion custom_components/yerushamayim/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from typing import Any

import voluptuous as vol

from homeassistant import config_entries
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResult
Expand All @@ -29,7 +31,13 @@ async def async_step_user(
if user_input is not None:
return self.async_create_entry(title="Yerushamayim Weather", data={})

return self.async_show_form(step_id="user")
return self.async_show_form(
step_id="user",
data_schema=vol.Schema({}),
# description_placeholders={
# "description": "Do you want to add Yerushamayim to Home Assistant?"
# },
)

async def async_step_import(self, user_input: dict[str, Any]) -> FlowResult:
"""Handle import step."""
Expand Down
18 changes: 9 additions & 9 deletions custom_components/yerushamayim/strings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"title": "Yerushamayim Weather",
"config": {
"step": {
"user": {
"title": "[%key:component::yerushamayim::title%]",
"description": "Do you want to add Yerushamayim to Home Assistant?"
"step": {
"user": {
"title": "[%key:component::yerushamayim::title%]",
"description": "Do you want to add Yerushamayim to Home Assistant?"
}
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]"
}
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]"
}
}
}
}

0 comments on commit db11a8a

Please sign in to comment.