Skip to content

Commit ab0f4e5

Browse files
committed
Fix misleading comment in permalink_entity function
1 parent 93de108 commit ab0f4e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/update-readme.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def permalink_entity(x, yaml_fname):
7171
raise ValueError("Incorrectly identified entity which is actually a service.")
7272
domain, name = x.split(".")
7373
fname = Path(yaml_fname or f"includes/{domain}s.yaml")
74-
# Try legacy format first (e.g., "entity_name:"), then modern template format
75-
# (e.g., "unique_id: entity_name")
74+
# Try key format (e.g., "script_name:" in scripts.yaml), then unique_id format
75+
# (e.g., "unique_id: entity_name" in templates.yaml)
7676
for pattern in [f"{name}:", f"unique_id: {name}"]:
7777
with suppress(ValueError):
7878
from_line = line_number(fname, pattern, True)

0 commit comments

Comments
 (0)