mirror of
https://github.com/esphome/esphome.git
synced 2025-10-31 23:21:54 +00:00
preen
This commit is contained in:
@@ -1014,13 +1014,11 @@ async def to_code(config):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Collect all custom preset names (from preset map + custom_presets list)
|
# Collect all custom preset names (from preset map + custom_presets list)
|
||||||
all_custom_preset_names = []
|
all_custom_preset_names = [
|
||||||
if CONF_PRESET in config:
|
preset_config[CONF_NAME]
|
||||||
for preset_config in config[CONF_PRESET]:
|
for preset_config in config.get(CONF_PRESET, [])
|
||||||
name = preset_config[CONF_NAME]
|
if preset_config[CONF_NAME].upper() not in climate.CLIMATE_PRESETS
|
||||||
# Only include non-standard presets
|
]
|
||||||
if name.upper() not in climate.CLIMATE_PRESETS:
|
|
||||||
all_custom_preset_names.append(name)
|
|
||||||
|
|
||||||
# Add additional custom presets from custom_presets list
|
# Add additional custom presets from custom_presets list
|
||||||
if CONF_CUSTOM_PRESETS in config:
|
if CONF_CUSTOM_PRESETS in config:
|
||||||
|
|||||||
Reference in New Issue
Block a user