diff --git a/src/panels/lovelace/editor/config-elements/hui-entities-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-entities-card-editor.ts
index cc7d38c669..21c884a702 100644
--- a/src/panels/lovelace/editor/config-elements/hui-entities-card-editor.ts
+++ b/src/panels/lovelace/editor/config-elements/hui-entities-card-editor.ts
@@ -47,6 +47,7 @@ const cardConfigStruct = object({
title: optional(union([string(), boolean()])),
theme: optional(string()),
show_header_toggle: optional(boolean()),
+ state_color: optional(boolean()),
entities: array(entitiesConfigStruct),
header: optional(headerFooterConfigStructs),
footer: optional(headerFooterConfigStructs),
@@ -89,33 +90,47 @@ export class HuiEntitiesCardEditor extends LitElement
)} (${this.hass.localize(
"ui.panel.lovelace.editor.card.config.optional"
)})"
- .value="${this._title}"
- .configValue="${"title"}"
- @value-changed="${this._valueChanged}"
+ .value=${this._title}
+ .configValue=${"title"}
+ @value-changed=${this._valueChanged}
>
-
-
-
+
+
+
+
+
+
+
+
`;
}
diff --git a/src/panels/lovelace/editor/config-elements/hui-glance-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-glance-card-editor.ts
index b8bde70faf..7d3de02655 100644
--- a/src/panels/lovelace/editor/config-elements/hui-glance-card-editor.ts
+++ b/src/panels/lovelace/editor/config-elements/hui-glance-card-editor.ts
@@ -47,6 +47,7 @@ const cardConfigStruct = object({
show_name: optional(boolean()),
show_state: optional(boolean()),
show_icon: optional(boolean()),
+ state_color: optional(boolean()),
entities: array(entitiesConfigStruct),
});
@@ -89,6 +90,10 @@ export class HuiGlanceCardEditor extends LitElement
return this._config!.show_state || true;
}
+ get _state_color(): boolean {
+ return this._config!.state_color ?? true;
+ }
+
protected render(): TemplateResult {
if (!this.hass || !this._config) {
return html``;
@@ -105,16 +110,16 @@ export class HuiGlanceCardEditor extends LitElement
)} (${this.hass.localize(
"ui.panel.lovelace.editor.card.config.optional"
)})"
- .value="${this._title}"
- .configValue="${"title"}"
- @value-changed="${this._valueChanged}"
+ .value=${this._title}
+ .configValue=${"title"}
+ @value-changed=${this._valueChanged}
>
@@ -138,8 +143,8 @@ export class HuiGlanceCardEditor extends LitElement
>
@@ -152,8 +157,8 @@ export class HuiGlanceCardEditor extends LitElement
>
@@ -167,18 +172,30 @@ export class HuiGlanceCardEditor extends LitElement
>
+
+
+
`;
}
diff --git a/src/translations/en.json b/src/translations/en.json
index 2108e81755..d922b5f919 100755
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -2256,7 +2256,8 @@
"url": "Url",
"state": "State",
"secondary_info_attribute": "Secondary Info Attribute",
- "search": "Search"
+ "search": "Search",
+ "state_color": "Color icons based on state?"
},
"map": {
"name": "Map",