Skip to content

Commit

Permalink
🔧 Add suggested values to schema in automation flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
basbruss committed Apr 5, 2024
1 parent 5b0c7d4 commit 24f52a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/adaptive_cover/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ async def async_step_automation(self, user_input: dict[str, Any] | None = None):
if user_input is not None:
self.options.update(user_input)
return await self._update_options()
return self.async_show_form(step_id="automation", data_schema=AUTOMATION_CONFIG)
return self.async_show_form(step_id="automation", data_schema=self.add_suggested_values_to_schema(
AUTOMATION_CONFIG, user_input or self.options
))

async def async_step_blind(self, user_input: dict[str, Any] | None = None):
"""Adjust blind parameters."""
Expand Down

0 comments on commit 24f52a2

Please sign in to comment.