Fix media players with unknown state not being able to browse media (#13502)

This commit is contained in:
Franck Nijhof 2022-08-29 18:14:56 +02:00 committed by GitHub
parent 80a2a7b989
commit 989a0b9173
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ import { supportsFeature } from "../../common/entity/supports-feature";
import "../../components/ha-button-menu"; import "../../components/ha-button-menu";
import "../../components/ha-circular-progress"; import "../../components/ha-circular-progress";
import "../../components/ha-icon-button"; import "../../components/ha-icon-button";
import { UNAVAILABLE_STATES } from "../../data/entity"; import { UNAVAILABLE } from "../../data/entity";
import { subscribeEntityRegistry } from "../../data/entity_registry"; import { subscribeEntityRegistry } from "../../data/entity_registry";
import { import {
BROWSER_PLAYER, BROWSER_PLAYER,
@ -357,7 +357,7 @@ export class BarMediaPlayer extends SubscribeMixin(LitElement) {
(source) => html` (source) => html`
<mwc-list-item <mwc-list-item
?selected=${source.entity_id === this.entityId} ?selected=${source.entity_id === this.entityId}
.disabled=${UNAVAILABLE_STATES.includes(source.state)} .disabled=${source.state === UNAVAILABLE}
.player=${source.entity_id} .player=${source.entity_id}
@click=${this._selectPlayer} @click=${this._selectPlayer}
> >