mirror of
https://github.com/esphome/esphome.git
synced 2025-01-28 22:42:28 +01:00
[config] Early check for required version (#8000)
This commit is contained in:
parent
f1712cffa8
commit
bd17ee8e33
@ -18,6 +18,7 @@ from esphome.const import (
|
||||
CONF_ESPHOME,
|
||||
CONF_EXTERNAL_COMPONENTS,
|
||||
CONF_ID,
|
||||
CONF_MIN_VERSION,
|
||||
CONF_PACKAGES,
|
||||
CONF_PLATFORM,
|
||||
CONF_SUBSTITUTIONS,
|
||||
@ -839,6 +840,10 @@ def validate_config(
|
||||
# Remove temporary esphome config path again, it will be reloaded later
|
||||
result.remove_output_path([CONF_ESPHOME], CONF_ESPHOME)
|
||||
|
||||
# Check version number now to avoid loading components that are not supported
|
||||
if min_version := config[CONF_ESPHOME].get(CONF_MIN_VERSION):
|
||||
cv.All(cv.version_number, cv.validate_esphome_version)(min_version)
|
||||
|
||||
# First run platform validation steps
|
||||
for key in TARGET_PLATFORMS:
|
||||
if key in config:
|
||||
|
Loading…
Reference in New Issue
Block a user