mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
Correctly color script state icon + handle "single" mode for cancel buttons (#8383)
This commit is contained in:
parent
7c1fd542da
commit
db9cea81db
@ -15,7 +15,7 @@ export const iconColorCSS = css`
|
||||
ha-icon[data-domain="media_player"][data-state="on"],
|
||||
ha-icon[data-domain="media_player"][data-state="paused"],
|
||||
ha-icon[data-domain="media_player"][data-state="playing"],
|
||||
ha-icon[data-domain="script"][data-state="running"],
|
||||
ha-icon[data-domain="script"][data-state="on"],
|
||||
ha-icon[data-domain="sun"][data-state="above_horizon"],
|
||||
ha-icon[data-domain="switch"][data-state="on"],
|
||||
ha-icon[data-domain="timer"][data-state="active"],
|
||||
|
@ -115,7 +115,7 @@ export class StateBadge extends LitElement {
|
||||
// eslint-disable-next-line
|
||||
console.warn(errorMessage);
|
||||
}
|
||||
// lowest brighntess will be around 50% (that's pretty dark)
|
||||
// lowest brightness will be around 50% (that's pretty dark)
|
||||
iconStyle.filter = `brightness(${(brightness + 245) / 5}%)`;
|
||||
}
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -33,7 +33,8 @@ export class StateCardScript extends LitElement {
|
||||
></state-info>
|
||||
${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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user