diff --git a/src/components/ha-expansion-panel.ts b/src/components/ha-expansion-panel.ts index 5f82762fa387..47c108e5bd38 100644 --- a/src/components/ha-expansion-panel.ts +++ b/src/components/ha-expansion-panel.ts @@ -21,6 +21,8 @@ export class HaExpansionPanel extends LitElement { @property({ type: Boolean, reflect: true }) leftChevron = false; + @property({ type: Boolean, reflect: true }) noCollapse = false; + @property() header?: string; @property() secondary?: string; @@ -34,16 +36,17 @@ export class HaExpansionPanel extends LitElement {
@@ -141,6 +117,85 @@ export abstract class HaBlueprintGenericEditor extends LitElement {
`;
}
+ private renderSection(sectionKey: string, section: BlueprintInputSection) {
+ const title = section?.name || sectionKey;
+ const anyRequired =
+ section.input &&
+ Object.values(section.input).some(
+ (item) => item === null || item.default === undefined
+ );
+ const expanded = !section.collapsed || anyRequired;
+
+ return html`