Use suggestd_value instead of default in Monoprice options flow (#35107)
This commit is contained in:
parent
5a2528b0f1
commit
90fbb150e7
1 changed files with 3 additions and 1 deletions
|
@ -99,7 +99,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||||
@core.callback
|
@core.callback
|
||||||
def _key_for_source(index, source, previous_sources):
|
def _key_for_source(index, source, previous_sources):
|
||||||
if str(index) in 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:
|
else:
|
||||||
key = vol.Optional(source)
|
key = vol.Optional(source)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue