diff --git a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts index 755b8b706a..270fb74175 100644 --- a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts @@ -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`