diff --git a/src/panels/lovelace/common/generate-lovelace-config.ts b/src/panels/lovelace/common/generate-lovelace-config.ts index 65b66c3ce1..673e8286a5 100644 --- a/src/panels/lovelace/common/generate-lovelace-config.ts +++ b/src/panels/lovelace/common/generate-lovelace-config.ts @@ -36,6 +36,7 @@ const HIDE_DOMAIN = new Set([ "script", "sun", "zone", + "event", ]); const HIDE_PLATFORM = new Set(["mobile_app"]); diff --git a/src/panels/lovelace/entity-rows/hui-event-entity-row.ts b/src/panels/lovelace/entity-rows/hui-event-entity-row.ts index cb6e097a50..f7abad2349 100644 --- a/src/panels/lovelace/entity-rows/hui-event-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-event-entity-row.ts @@ -68,16 +68,23 @@ class HuiEventEntityRow extends LitElement implements LovelaceRow { hasDoubleClick: hasAction(this._config.double_tap_action), })} > -
- ${computeStateDisplay( - this.hass!.localize, - stateObj, - this.hass.locale, - this.hass.config, - this.hass.entities - )} -
+ ${isUnavailableState(stateObj.state) + ? computeStateDisplay( + this.hass!.localize, + stateObj, + this.hass.locale, + this.hass.config, + this.hass.entities + ) + : html``} +
+
${isUnavailableState(stateObj.state) ? `` : computeAttributeValueDisplay( @@ -104,10 +111,10 @@ class HuiEventEntityRow extends LitElement implements LovelaceRow { text-align: right; } .when { - color: var(--secondary-text-color); + color: var(--primary-text-color); } .what { - color: var(--primary-text-color); + color: var(--secondary-text-color); } `; }