From f0aa530069937660131f8feeedc04acf2290317a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 25 Oct 2025 10:42:20 -0700 Subject: [PATCH] preen --- esphome/components/template/select/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/template/select/__init__.py b/esphome/components/template/select/__init__.py index 40ba557d9b..0e9c240547 100644 --- a/esphome/components/template/select/__init__.py +++ b/esphome/components/template/select/__init__.py @@ -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: