mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
media-row: fix when to show power toggle (#5379)
This commit is contained in:
parent
6692fa439a
commit
5f467f82e0
@ -100,9 +100,10 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
|
|||||||
.config=${this._config}
|
.config=${this._config}
|
||||||
.secondaryText=${this._computeMediaTitle(stateObj)}
|
.secondaryText=${this._computeMediaTitle(stateObj)}
|
||||||
>
|
>
|
||||||
${stateObj.state === "off" || stateObj.state === "idle"
|
${(supportsFeature(stateObj, SUPPORT_TURN_ON) &&
|
||||||
? supportsFeature(stateObj, SUPPORT_TURN_ON)
|
(stateObj.state === "off" || stateObj.state === "idle")) ||
|
||||||
: supportsFeature(stateObj, SUPPORT_TURN_OFF)
|
(supportsFeature(stateObj, SUPPORT_TURN_OFF) &&
|
||||||
|
stateObj.state !== "off")
|
||||||
? html`
|
? html`
|
||||||
<paper-icon-button
|
<paper-icon-button
|
||||||
icon="hass:power"
|
icon="hass:power"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user