mirror of
https://github.com/esphome/esphome.git
synced 2025-09-19 11:42:20 +01:00
simplify
This commit is contained in:
@@ -566,7 +566,7 @@ async def to_code(config: ConfigType) -> None:
|
|||||||
raise vol.Invalid(
|
raise vol.Invalid(
|
||||||
f"Device '{device_name}' has an area_id '{area_id.id}'"
|
f"Device '{device_name}' has an area_id '{area_id.id}'"
|
||||||
" that does not exist.",
|
" 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)
|
area_id_hash = fnv1a_32bit_hash(area_id.id)
|
||||||
cg.add(dev.set_area_id(area_id_hash))
|
cg.add(dev.set_area_id(area_id_hash))
|
||||||
|
Reference in New Issue
Block a user