diff --git a/src/components/tile/ha-tile-info.ts b/src/components/tile/ha-tile-info.ts
index df8b7e4db7..8168badeba 100644
--- a/src/components/tile/ha-tile-info.ts
+++ b/src/components/tile/ha-tile-info.ts
@@ -1,20 +1,21 @@
-import type { TemplateResult } from "lit";
-import { html, css, LitElement, nothing } from "lit";
+import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
@customElement("ha-tile-info")
export class HaTileInfo extends LitElement {
@property() public primary?: string;
- @property() public secondary?: string | TemplateResult<1>;
+ @property() public secondary?: string;
protected render() {
return html`
- ${this.primary}
- ${this.secondary
- ? html`${this.secondary}`
- : nothing}
+
+ ${this.primary}
+
+
+ ${this.secondary}
+
`;
}
@@ -27,7 +28,8 @@ export class HaTileInfo extends LitElement {
align-items: flex-start;
justify-content: center;
}
- span {
+ span,
+ ::slotted(*) {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts
index 5d3c33a019..2083fb0a28 100644
--- a/src/panels/lovelace/cards/hui-tile-card.ts
+++ b/src/panels/lovelace/cards/hui-tile-card.ts
@@ -325,11 +325,12 @@ export class HuiTileCard extends LitElement implements LovelaceCard {
>
${renderTileBadge(stateObj, this.hass)}
-
+
+ ${name}
+ ${stateDisplay
+ ? html`${stateDisplay}`
+ : nothing}
+
${features.length > 0
? html`