mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 00:48:19 +01:00
[config] Retain path information in validated configuration (#6785)
This commit is contained in:
parent
699d00e218
commit
7b9fb57bb2
1 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ from esphome.const import (
|
||||||
CONF_EXTERNAL_COMPONENTS,
|
CONF_EXTERNAL_COMPONENTS,
|
||||||
TARGET_PLATFORMS,
|
TARGET_PLATFORMS,
|
||||||
)
|
)
|
||||||
from esphome.core import CORE, EsphomeError
|
from esphome.core import CORE, EsphomeError, DocumentRange
|
||||||
from esphome.helpers import indent
|
from esphome.helpers import indent
|
||||||
from esphome.util import safe_print, OrderedDict
|
from esphome.util import safe_print, OrderedDict
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ class Config(OrderedDict, fv.FinalValidateConfig):
|
||||||
|
|
||||||
def get_deepest_document_range_for_path(
|
def get_deepest_document_range_for_path(
|
||||||
self, path: ConfigPath, get_key: bool = False
|
self, path: ConfigPath, get_key: bool = False
|
||||||
) -> ESPHomeDataBase | None:
|
) -> DocumentRange | None:
|
||||||
data = self
|
data = self
|
||||||
doc_range = None
|
doc_range = None
|
||||||
for index, path_item in enumerate(path):
|
for index, path_item in enumerate(path):
|
||||||
|
@ -1123,4 +1123,4 @@ def read_config(command_line_substitutions):
|
||||||
safe_print("")
|
safe_print("")
|
||||||
|
|
||||||
return None
|
return None
|
||||||
return OrderedDict(res)
|
return res
|
||||||
|
|
Loading…
Reference in a new issue