Use suggestd_value instead of default in Monoprice options flow (#35107)

This commit is contained in:
On Freund
2020-05-03 16:18:25 +03:00
committed by GitHub
parent 5a2528b0f1
commit 90fbb150e7

View File

@@ -99,7 +99,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
@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)]}
)
else:
key = vol.Optional(source)