Fix media player list when there are entities not in the registry (#17015)

This commit is contained in:
J. Nick Koston 2023-06-24 01:37:38 -05:00 committed by GitHub
parent bf18deb83c
commit 76490cc690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -464,7 +464,7 @@ export class BarMediaPlayer extends SubscribeMixin(LitElement) {
(entity) =>
computeStateDomain(entity) === "media_player" &&
supportsFeature(entity, MediaPlayerEntityFeature.BROWSE_MEDIA) &&
!this.hass.entities[entity.entity_id].hidden
!this.hass.entities[entity.entity_id]?.hidden
);
}