Skip to content

Commit a34ca3c

Browse files
authored
Fix disabled automation style (#26988)
* Update disabled state logic in action and condition editors to account for indent property * Remove opacity
1 parent 9a8ca36 commit a34ca3c

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/panels/config/automation/action/ha-automation-action-editor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export default class HaAutomationActionEditor extends LitElement {
5050
class=${classMap({
5151
"card-content": true,
5252
disabled:
53-
this.disabled || (this.action.enabled === false && !this.yamlMode),
53+
!this.indent &&
54+
(this.disabled ||
55+
(this.action.enabled === false && !this.yamlMode)),
5456
yaml: yamlMode,
5557
indent: this.indent,
5658
card: !this.inSidebar,

src/panels/config/automation/condition/ha-automation-condition-editor.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ export default class HaAutomationConditionEditor extends LitElement {
5353
class=${classMap({
5454
"card-content": true,
5555
disabled:
56-
this.disabled ||
57-
(this.condition.enabled === false && !this.yamlMode),
56+
!this.indent &&
57+
(this.disabled ||
58+
(this.condition.enabled === false && !this.yamlMode)),
5859
yaml: yamlMode,
5960
indent: this.indent,
6061
card: !this.inSidebar,

src/panels/config/automation/styles.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export const rowStyles = css`
4444

4545
export const editorStyles = css`
4646
.disabled {
47-
opacity: 0.5;
4847
pointer-events: none;
4948
}
5049

src/panels/config/automation/trigger/ha-automation-trigger-editor.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ export default class HaAutomationTriggerEditor extends LitElement {
141141
haStyle,
142142
css`
143143
.disabled {
144-
opacity: 0.5;
145144
pointer-events: none;
146145
}
147146

0 commit comments

Comments
 (0)