Fix disabled automation style (#26988)

* Update disabled state logic in action and condition editors to account for indent property

* Remove opacity
This commit is contained in:
Wendelin
2025-09-10 14:01:05 +02:00
committed by GitHub
parent 9a8ca36047
commit a34ca3c085
4 changed files with 6 additions and 5 deletions

View File

@@ -50,7 +50,9 @@ export default class HaAutomationActionEditor extends LitElement {
class=${classMap({ class=${classMap({
"card-content": true, "card-content": true,
disabled: disabled:
this.disabled || (this.action.enabled === false && !this.yamlMode), !this.indent &&
(this.disabled ||
(this.action.enabled === false && !this.yamlMode)),
yaml: yamlMode, yaml: yamlMode,
indent: this.indent, indent: this.indent,
card: !this.inSidebar, card: !this.inSidebar,

View File

@@ -53,8 +53,9 @@ export default class HaAutomationConditionEditor extends LitElement {
class=${classMap({ class=${classMap({
"card-content": true, "card-content": true,
disabled: disabled:
this.disabled || !this.indent &&
(this.condition.enabled === false && !this.yamlMode), (this.disabled ||
(this.condition.enabled === false && !this.yamlMode)),
yaml: yamlMode, yaml: yamlMode,
indent: this.indent, indent: this.indent,
card: !this.inSidebar, card: !this.inSidebar,

View File

@@ -44,7 +44,6 @@ export const rowStyles = css`
export const editorStyles = css` export const editorStyles = css`
.disabled { .disabled {
opacity: 0.5;
pointer-events: none; pointer-events: none;
} }

View File

@@ -141,7 +141,6 @@ export default class HaAutomationTriggerEditor extends LitElement {
haStyle, haStyle,
css` css`
.disabled { .disabled {
opacity: 0.5;
pointer-events: none; pointer-events: none;
} }