1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 23:21:54 +00:00
This commit is contained in:
J. Nick Koston
2025-10-30 10:24:20 -05:00
parent 9687ba3c36
commit 68caee3226

View File

@@ -1014,13 +1014,11 @@ async def to_code(config):
)
# Collect all custom preset names (from preset map + custom_presets list)
all_custom_preset_names = []
if CONF_PRESET in config:
for preset_config in config[CONF_PRESET]:
name = preset_config[CONF_NAME]
# Only include non-standard presets
if name.upper() not in climate.CLIMATE_PRESETS:
all_custom_preset_names.append(name)
all_custom_preset_names = [
preset_config[CONF_NAME]
for preset_config in config.get(CONF_PRESET, [])
if preset_config[CONF_NAME].upper() not in climate.CLIMATE_PRESETS
]
# Add additional custom presets from custom_presets list
if CONF_CUSTOM_PRESETS in config: