Restore media browser to browser when entity is not in state machine (#24982)

restore media browser to browser when entity is not in state machine
This commit is contained in:
Bram Kragten 2025-04-09 15:49:16 +02:00 committed by GitHub
parent ccee57f4a5
commit 590df8dd1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -191,6 +191,14 @@ class PanelMediaBrowser extends LitElement {
public willUpdate(changedProps: PropertyValues): void {
super.willUpdate(changedProps);
if (
!this.hasUpdated &&
this._entityId !== BROWSER_PLAYER &&
!(this._entityId in this.hass.states)
) {
this._entityId = BROWSER_PLAYER;
}
if (!changedProps.has("route")) {
return;
}