From 97ca0b818e90dab52fe98299a65b0a8998cc863f Mon Sep 17 00:00:00 2001 From: Philip Allgaier Date: Mon, 12 Oct 2020 11:43:46 +0200 Subject: [PATCH] Capitalize first character of attributes (#7313) --- src/components/ha-attributes.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/ha-attributes.ts b/src/components/ha-attributes.ts index a92d4912b6..933ed41d19 100644 --- a/src/components/ha-attributes.ts +++ b/src/components/ha-attributes.ts @@ -33,7 +33,9 @@ class HaAttributes extends LitElement { ).map( (attribute) => html`
-
${attribute.replace(/_/g, " ")}
+
+ ${attribute.replace(/_/g, " ").replace("id", "ID")} +
${this.formatAttribute(attribute)}
@@ -62,6 +64,9 @@ class HaAttributes extends LitElement { max-width: 200px; overflow-wrap: break-word; } + .key:first-letter { + text-transform: capitalize; + } .attribution { color: var(--secondary-text-color); text-align: right;