Skip to content

Commit

Permalink
Address late review for Holiday (home-assistant#105121)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieger authored Dec 6, 2023
1 parent 7424c29 commit 81d05ac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions homeassistant/components/holiday/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class HolidayConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):

VERSION = 1

data: dict[str, Any] = {}
def __init__(self) -> None:
"""Initialize the config flow."""
self.data: dict[str, Any] = {}

async def async_step_user(
self, user_input: dict[str, Any] | None = None
Expand All @@ -37,7 +39,7 @@ async def async_step_user(
if user_input is not None:
self.data = user_input

selected_country = self.data[CONF_COUNTRY]
selected_country = user_input[CONF_COUNTRY]

if SUPPORTED_COUNTRIES[selected_country]:
return await self.async_step_province()
Expand All @@ -46,7 +48,7 @@ async def async_step_user(

locale = Locale(self.hass.config.language)
title = locale.territories[selected_country]
return self.async_create_entry(title=title, data=self.data)
return self.async_create_entry(title=title, data=user_input)

user_schema = vol.Schema(
{
Expand Down

0 comments on commit 81d05ac

Please sign in to comment.