1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 15:12:06 +00:00
This commit is contained in:
J. Nick Koston
2025-10-25 10:42:20 -07:00
parent 641bcc1dca
commit f0aa530069

View File

@@ -83,7 +83,7 @@ async def to_code(config):
cg.add(var.set_initial_option_index(initial_option_index))
# Only set if True (default is False)
if CONF_RESTORE_VALUE in config and config[CONF_RESTORE_VALUE]:
if config.get(CONF_RESTORE_VALUE):
cg.add(var.set_restore_value(True))
if CONF_SET_ACTION in config: