mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-30 12:46:35 +00:00
Update hui-media-player-entity-row.ts
This commit is contained in:
parent
9e2606f1c8
commit
793a704871
@ -84,6 +84,18 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
|
|||||||
|
|
||||||
const stateObj = this.hass.states[this._config.entity];
|
const stateObj = this.hass.states[this._config.entity];
|
||||||
|
|
||||||
|
if (!stateObj) {
|
||||||
|
return html`
|
||||||
|
<hui-warning
|
||||||
|
>${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.warning.entity_not_found",
|
||||||
|
"entity",
|
||||||
|
this._config.entity
|
||||||
|
)}</hui-warning
|
||||||
|
>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
const buttons = html`
|
const buttons = html`
|
||||||
${!this._narrow && supportsFeature(stateObj, SUPPORT_PREVIOUS_TRACK)
|
${!this._narrow && supportsFeature(stateObj, SUPPORT_PREVIOUS_TRACK)
|
||||||
? html`
|
? html`
|
||||||
@ -112,18 +124,6 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
|
|||||||
: ""}
|
: ""}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
if (!stateObj) {
|
|
||||||
return html`
|
|
||||||
<hui-warning
|
|
||||||
>${this.hass.localize(
|
|
||||||
"ui.panel.lovelace.warning.entity_not_found",
|
|
||||||
"entity",
|
|
||||||
this._config.entity
|
|
||||||
)}</hui-warning
|
|
||||||
>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<hui-generic-entity-row
|
<hui-generic-entity-row
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user