From 180aeb7d8e2c79dd78f5681a7eb833087b52337c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 22 Jun 2025 13:50:29 +0200 Subject: [PATCH] simplify --- esphome/core/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/config.py b/esphome/core/config.py index 93fabe1495..45ba214e44 100644 --- a/esphome/core/config.py +++ b/esphome/core/config.py @@ -566,7 +566,7 @@ async def to_code(config: ConfigType) -> None: raise vol.Invalid( f"Device '{device_name}' has an area_id '{area_id.id}'" " that does not exist.", - path=[CONF_DEVICES, device_id, CONF_AREA_ID], + path=[CONF_DEVICES, dev_conf[CONF_ID], CONF_AREA_ID], ) area_id_hash = fnv1a_32bit_hash(area_id.id) cg.add(dev.set_area_id(area_id_hash))