mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26: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}
|
||||
.secondaryText=${this._computeMediaTitle(stateObj)}
|
||||
>
|
||||
${stateObj.state === "off" || stateObj.state === "idle"
|
||||
? supportsFeature(stateObj, SUPPORT_TURN_ON)
|
||||
: supportsFeature(stateObj, SUPPORT_TURN_OFF)
|
||||
${(supportsFeature(stateObj, SUPPORT_TURN_ON) &&
|
||||
(stateObj.state === "off" || stateObj.state === "idle")) ||
|
||||
(supportsFeature(stateObj, SUPPORT_TURN_OFF) &&
|
||||
stateObj.state !== "off")
|
||||
? html`
|
||||
<paper-icon-button
|
||||
icon="hass:power"
|
||||
|
Loading…
x
Reference in New Issue
Block a user