Skip to content

Commit

Permalink
Fix default date for first day (every_n_days) for iOS (No First date …
Browse files Browse the repository at this point in the history
…field in "every-n-days" #420)
  • Loading branch information
bruxy70 committed Dec 19, 2022
1 parent 63600f0 commit 9053bf0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/garbage_collection/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


async def _validate_config(
handler: SchemaConfigFlowHandler | SchemaOptionsFlowHandler, data: Any
_: SchemaConfigFlowHandler | SchemaOptionsFlowHandler, data: Any
) -> Any:
"""Validate config."""
if const.CONF_DATE in data:
Expand Down Expand Up @@ -209,7 +209,7 @@ async def detail_config_schema(
if handler.options[const.CONF_FREQUENCY] in const.DAILY_FREQUENCY:
# every-n-days
options_schema[
required(const.CONF_FIRST_DATE, handler.options)
required(const.CONF_FIRST_DATE, handler.options, helpers.now().date())
] = selector.DateSelector()
if handler.options.get(const.CONF_VERBOSE_STATE, False):
# "verbose_state"
Expand All @@ -224,7 +224,7 @@ async def detail_config_schema(
return vol.Schema(options_schema)


async def choose_details_step(options: dict[str, Any]) -> str:
async def choose_details_step(_: dict[str, Any]) -> str:
"""Return next step_id for options flow."""
return "detail"

Expand Down

0 comments on commit 9053bf0

Please sign in to comment.