Skip to content

Commit a15f0c7

Browse files
authored
Show the correct area icon in entity breadcrumb (#24913)
1 parent e37f721 commit a15f0c7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/components/ha-related-items.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
mdiAlertCircleOutline,
44
mdiDevices,
55
mdiPaletteSwatch,
6-
mdiSofa,
6+
mdiTextureBox,
77
} from "@mdi/js";
88
import type { CSSResultGroup, PropertyValues } from "lit";
99
import { LitElement, css, html, nothing } from "lit";
@@ -235,10 +235,15 @@ export class HaRelatedItems extends LitElement {
235235
})}
236236
slot="graphic"
237237
></div>`
238-
: html`<ha-svg-icon
239-
.path=${mdiSofa}
240-
slot="graphic"
241-
></ha-svg-icon>`}
238+
: area.icon
239+
? html`<ha-icon
240+
slot="graphic"
241+
.icon=${area.icon}
242+
></ha-icon>`
243+
: html`<ha-svg-icon
244+
slot="graphic"
245+
.path=${mdiTextureBox}
246+
></ha-svg-icon>`}
242247
${area.name}
243248
<ha-icon-next slot="meta"></ha-icon-next>
244249
</ha-list-item>

0 commit comments

Comments
 (0)