Skip to content

Commit 83918f5

Browse files
authored
Use original entity icon by default (#825)
1 parent 04822f3 commit 83918f5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/const.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const REPEAT_STATE = {
3030
};
3131

3232
const ICON = {
33-
DEFAULT: 'mdi:cast',
3433
DROPDOWN: 'mdi:chevron-down',
3534
GROUP: 'mdi:speaker-multiple',
3635
MENU: 'mdi:menu-down',

src/main.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@ class MiniMediaPlayer extends LitElement {
301301

302302
const active = !this.config.hide.icon_state && this.player.isActive;
303303
return html` <div class="entity__icon" ?color=${active}>
304-
<ha-icon .icon=${this.computeIcon()}></ha-icon>
304+
<ha-state-icon
305+
.hass=${this.hass}
306+
.icon=${this.config.icon}
307+
.state=${this.entity}
308+
.stateObj=${this.entity}
309+
></ha-state-icon>
305310
</div>`;
306311
}
307312

@@ -370,10 +375,6 @@ class MiniMediaPlayer extends LitElement {
370375
}
371376
}
372377

373-
computeIcon(): string {
374-
return this.config.icon ? this.config.icon : this.player.icon || ICON.DEFAULT;
375-
}
376-
377378
measureCard(): void {
378379
const card = this.shadowRoot?.querySelector('ha-card') as HTMLElement | undefined;
379380
if (!card) {

0 commit comments

Comments
 (0)