From 3f579e5e95918ac40ca30069ec34745c582908c4 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 1 Dec 2022 14:19:53 +0100 Subject: [PATCH] Add colors --- src/dialogs/more-info/more-info-related-info.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/dialogs/more-info/more-info-related-info.ts b/src/dialogs/more-info/more-info-related-info.ts index 97f5a76b51..575721dd40 100644 --- a/src/dialogs/more-info/more-info-related-info.ts +++ b/src/dialogs/more-info/more-info-related-info.ts @@ -1,9 +1,11 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, html, LitElement, TemplateResult } from "lit"; import { customElement, property } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { computeStateDisplay } from "../../common/entity/compute_state_display"; +import { stateColor } from "../../common/entity/state_color"; import { stateIconPath } from "../../common/entity/state_icon_path"; import "../../components/ha-chip"; import "../../components/ha-chip-set"; @@ -60,6 +62,7 @@ class MoreInfoContent extends LitElement { entity, this.hass!.locale ); + const color = stateColor(entity); return html`