File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ const REPEAT_STATE = {
30
30
} ;
31
31
32
32
const ICON = {
33
- DEFAULT : 'mdi:cast' ,
34
33
DROPDOWN : 'mdi:chevron-down' ,
35
34
GROUP : 'mdi:speaker-multiple' ,
36
35
MENU : 'mdi:menu-down' ,
Original file line number Diff line number Diff line change @@ -301,7 +301,12 @@ class MiniMediaPlayer extends LitElement {
301
301
302
302
const active = ! this . config . hide . icon_state && this . player . isActive ;
303
303
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 >
305
310
</ div > ` ;
306
311
}
307
312
@@ -370,10 +375,6 @@ class MiniMediaPlayer extends LitElement {
370
375
}
371
376
}
372
377
373
- computeIcon ( ) : string {
374
- return this . config . icon ? this . config . icon : this . player . icon || ICON . DEFAULT ;
375
- }
376
-
377
378
measureCard ( ) : void {
378
379
const card = this . shadowRoot ?. querySelector ( 'ha-card' ) as HTMLElement | undefined ;
379
380
if ( ! card ) {
You can’t perform that action at this time.
0 commit comments