Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion homeassistant/components/monoprice/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def async_get_options_flow(config_entry):
@core.callback
def _key_for_source(index, source, previous_sources):
if str(index) in previous_sources:
key = vol.Optional(source, default=previous_sources[str(index)])
key = vol.Optional(
source, description={"suggested_value": previous_sources[str(index)]}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has suggested_value been documented in our developer docs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It hasn't. I couldn't find any place where the use of schema for config flows was documented at all, so didn't really know where to put this.
More than happy to update the docs to reflect this if there's a relevant place.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

)
else:
key = vol.Optional(source)

Expand Down