1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-12 08:12:22 +01:00
This commit is contained in:
J. Nick Koston
2025-06-22 13:38:14 +02:00
parent b30b527ff9
commit 46b419ea8b

View File

@@ -559,7 +559,8 @@ async def to_code(config: ConfigType) -> None:
area_id_hash = fnv1a_32bit_hash(area_id.id)
if area_id.id not in area_ids:
raise vol.Invalid(
f"Device '{device_name}' has an area_id '{area_id.id}' that does not exist.",
f"Device '{device_name}' has an area_id '{area_id.id}'"
" that does not exist.",
path=[CONF_DEVICES, dev_conf[CONF_ID], CONF_AREA_ID],
)
cg.add(dev.set_area_id(area_id_hash))