From a34ca3c0853b5b6e03ac6c6fda2043e015a22d42 Mon Sep 17 00:00:00 2001 From: Wendelin <12148533+wendevlin@users.noreply.github.com> Date: Wed, 10 Sep 2025 14:01:05 +0200 Subject: [PATCH] Fix disabled automation style (#26988) * Update disabled state logic in action and condition editors to account for indent property * Remove opacity --- .../config/automation/action/ha-automation-action-editor.ts | 4 +++- .../automation/condition/ha-automation-condition-editor.ts | 5 +++-- src/panels/config/automation/styles.ts | 1 - .../automation/trigger/ha-automation-trigger-editor.ts | 1 - 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/panels/config/automation/action/ha-automation-action-editor.ts b/src/panels/config/automation/action/ha-automation-action-editor.ts index 7562fafcd8..d91997760f 100644 --- a/src/panels/config/automation/action/ha-automation-action-editor.ts +++ b/src/panels/config/automation/action/ha-automation-action-editor.ts @@ -50,7 +50,9 @@ export default class HaAutomationActionEditor extends LitElement { class=${classMap({ "card-content": true, disabled: - this.disabled || (this.action.enabled === false && !this.yamlMode), + !this.indent && + (this.disabled || + (this.action.enabled === false && !this.yamlMode)), yaml: yamlMode, indent: this.indent, card: !this.inSidebar, diff --git a/src/panels/config/automation/condition/ha-automation-condition-editor.ts b/src/panels/config/automation/condition/ha-automation-condition-editor.ts index d3aaf8cbdd..6698e7b048 100644 --- a/src/panels/config/automation/condition/ha-automation-condition-editor.ts +++ b/src/panels/config/automation/condition/ha-automation-condition-editor.ts @@ -53,8 +53,9 @@ export default class HaAutomationConditionEditor extends LitElement { class=${classMap({ "card-content": true, disabled: - this.disabled || - (this.condition.enabled === false && !this.yamlMode), + !this.indent && + (this.disabled || + (this.condition.enabled === false && !this.yamlMode)), yaml: yamlMode, indent: this.indent, card: !this.inSidebar, diff --git a/src/panels/config/automation/styles.ts b/src/panels/config/automation/styles.ts index 9e70e6af29..e0de576e17 100644 --- a/src/panels/config/automation/styles.ts +++ b/src/panels/config/automation/styles.ts @@ -44,7 +44,6 @@ export const rowStyles = css` export const editorStyles = css` .disabled { - opacity: 0.5; pointer-events: none; } diff --git a/src/panels/config/automation/trigger/ha-automation-trigger-editor.ts b/src/panels/config/automation/trigger/ha-automation-trigger-editor.ts index e28a57c407..5f927c5b5f 100644 --- a/src/panels/config/automation/trigger/ha-automation-trigger-editor.ts +++ b/src/panels/config/automation/trigger/ha-automation-trigger-editor.ts @@ -141,7 +141,6 @@ export default class HaAutomationTriggerEditor extends LitElement { haStyle, css` .disabled { - opacity: 0.5; pointer-events: none; }