File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed
src/panels/config/automation Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import type {
4444 AutomationClipboard ,
4545 Condition ,
4646} from "../../../../data/automation" ;
47+ import { CONDITION_BUILDING_BLOCKS } from "../../../../data/condition" ;
4748import { validateConfig } from "../../../../data/config" ;
4849import {
4950 floorsContext ,
@@ -87,7 +88,6 @@ import "./types/ha-automation-action-set_conversation_response";
8788import "./types/ha-automation-action-stop" ;
8889import "./types/ha-automation-action-wait_for_trigger" ;
8990import "./types/ha-automation-action-wait_template" ;
90- import { CONDITION_BUILDING_BLOCKS } from "../../../../data/condition" ;
9191
9292export const getAutomationActionType = memoizeOne (
9393 ( action : Action | undefined ) => {
@@ -441,9 +441,9 @@ export default class HaAutomationActionRow extends LitElement {
441441 ( blockType === "condition" &&
442442 CONDITION_BUILDING_BLOCKS . includes (
443443 ( this . action as Condition ) . condition
444- ) ) ) &&
445- ! this . _collapsed
444+ ) ) )
446445 ? html `< ha-automation-action-editor
446+ class =${ this . _collapsed ? "hidden" : "" }
447447 .hass =${ this . hass }
448448 .action=${ this . action }
449449 .narrow=${ this . narrow }
Original file line number Diff line number Diff line change @@ -370,9 +370,9 @@ export default class HaAutomationConditionRow extends LitElement {
370370 </ ha- card>
371371
372372 ${ this . optionsInSidebar &&
373- CONDITION_BUILDING_BLOCKS . includes ( this . condition . condition ) &&
374- ! this . _collapsed
373+ CONDITION_BUILDING_BLOCKS . includes ( this . condition . condition )
375374 ? html `<ha- auto mation- condition- edito r
375+ class= ${ this . _collapsed ? "hidden" : "" }
376376 .hass = ${ this . hass }
377377 .condition = ${ this . condition }
378378 .disabled = ${ this . disabled }
Original file line number Diff line number Diff line change @@ -189,6 +189,7 @@ export default class HaAutomationOptionRow extends LitElement {
189189 "card-content" : true ,
190190 indent : this . optionsInSidebar ,
191191 selected : this . _selected ,
192+ hidden : this . _collapsed ,
192193 } ) }
193194 >
194195 <h4>
@@ -245,9 +246,7 @@ export default class HaAutomationOptionRow extends LitElement {
245246 ` }
246247 </ ha- card>
247248
248- ${ this . optionsInSidebar && ! this . _collapsed
249- ? this . _renderContent ( )
250- : nothing }
249+ ${ this . optionsInSidebar ? this . _renderContent ( ) : nothing }
251250 ` ;
252251 }
253252
Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ export const rowStyles = css`
4343 border-color : var (--state-inactive-color );
4444 box-shadow : var (--shadow-default ), var (--shadow-focus );
4545 }
46+ .hidden {
47+ display : none;
48+ }
4649` ;
4750
4851export const editorStyles = css `
You can’t perform that action at this time.
0 commit comments