Update hui-media-player-entity-row.ts

This commit is contained in:
Bram Kragten 2020-04-02 17:46:07 +02:00
parent 9e2606f1c8
commit 793a704871

View File

@ -84,6 +84,18 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
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`
${!this._narrow && supportsFeature(stateObj, SUPPORT_PREVIOUS_TRACK)
? 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`
<hui-generic-entity-row
.hass=${this.hass}