1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-30 17:12:20 +01:00

[core] Improve entity duplicate validation error messages (#10184)

This commit is contained in:
J. Nick Koston
2025-08-11 16:58:51 -05:00
committed by GitHub
parent c14c4fb658
commit 82b7c1224c
6 changed files with 151 additions and 10 deletions

View File

@@ -627,13 +627,15 @@ class SchemaValidationStep(ConfigValidationStep):
def __init__(
self, domain: str, path: ConfigPath, conf: ConfigType, comp: ComponentManifest
):
self.domain = domain
self.path = path
self.conf = conf
self.comp = comp
def run(self, result: Config) -> None:
token = path_context.set(self.path)
with result.catch_error(self.path):
# The domain already contains the full component path (e.g., "sensor.template", "sensor.uptime")
with CORE.component_context(self.domain), result.catch_error(self.path):
if self.comp.is_platform:
# Remove 'platform' key for validation
input_conf = OrderedDict(self.conf)