Show the correct area icon in entity breadcrumb (#24913)

This commit is contained in:
Simon Lamon 2025-04-04 15:09:36 +02:00 committed by GitHub
parent e37f7219c2
commit a15f0c7814
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,7 @@ import {
mdiAlertCircleOutline, mdiAlertCircleOutline,
mdiDevices, mdiDevices,
mdiPaletteSwatch, mdiPaletteSwatch,
mdiSofa, mdiTextureBox,
} from "@mdi/js"; } from "@mdi/js";
import type { CSSResultGroup, PropertyValues } from "lit"; import type { CSSResultGroup, PropertyValues } from "lit";
import { LitElement, css, html, nothing } from "lit"; import { LitElement, css, html, nothing } from "lit";
@ -235,10 +235,15 @@ export class HaRelatedItems extends LitElement {
})} })}
slot="graphic" slot="graphic"
></div>` ></div>`
: html`<ha-svg-icon : area.icon
.path=${mdiSofa} ? html`<ha-icon
slot="graphic" slot="graphic"
></ha-svg-icon>`} .icon=${area.icon}
></ha-icon>`
: html`<ha-svg-icon
slot="graphic"
.path=${mdiTextureBox}
></ha-svg-icon>`}
${area.name} ${area.name}
<ha-icon-next slot="meta"></ha-icon-next> <ha-icon-next slot="meta"></ha-icon-next>
</ha-list-item> </ha-list-item>