1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-07 05:42:20 +01:00

Fix command line substitutions without any yaml substitutions (#6644)

This commit is contained in:
Jesse Hills
2024-04-29 07:33:52 +12:00
committed by GitHub
parent 0ef7781bb3
commit a700ae481d
15 changed files with 5 additions and 53 deletions

View File

@@ -756,11 +756,11 @@ def validate_config(
CORE.raw_config = config
# 1. Load substitutions
if CONF_SUBSTITUTIONS in config:
if CONF_SUBSTITUTIONS in config or command_line_substitutions:
from esphome.components import substitutions
result[CONF_SUBSTITUTIONS] = {
**config[CONF_SUBSTITUTIONS],
**config.get(CONF_SUBSTITUTIONS, {}),
**command_line_substitutions,
}
result.add_output_path([CONF_SUBSTITUTIONS], CONF_SUBSTITUTIONS)