[REF-1425] Always capitalize tag of StatefulComponent ()

This commit is contained in:
Masen Furer 2023-12-06 10:41:09 -07:00 committed by GitHub
parent 94f657cbd7
commit e0a1b39231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1476,7 +1476,9 @@ class StatefulComponent(BaseComponent):
code_hash = md5(str(rendered_code).encode("utf-8")).hexdigest()
# Format the tag name including the hash.
return format.format_state_name(f"{component.tag or 'Comp'}_{code_hash}")
return format.format_state_name(
f"{component.tag or 'Comp'}_{code_hash}"
).capitalize()
@classmethod
def _render_stateful_code(