Correctly color script state icon + handle "single" mode for cancel buttons (#8383)

This commit is contained in:
Philip Allgaier
2021-02-24 17:18:38 +01:00
committed by GitHub
parent 7c1fd542da
commit db9cea81db
4 changed files with 6 additions and 4 deletions

View File

@@ -54,7 +54,8 @@ class HuiScriptEntityRow extends LitElement implements LovelaceRow {
<hui-generic-entity-row .hass=${this.hass} .config=${this._config}>
${stateObj.state === "on"
? html`<mwc-button @click=${this._cancelScript}>
${(stateObj.attributes.current || 0) > 0
${stateObj.attributes.mode !== "single" &&
(stateObj.attributes.current || 0) > 0
? this.hass.localize(
"ui.card.script.cancel_multiple",
"number",