diff --git a/src/data/lovelace/config/section.ts b/src/data/lovelace/config/section.ts index 4c57cc63e4..d9f1065530 100644 --- a/src/data/lovelace/config/section.ts +++ b/src/data/lovelace/config/section.ts @@ -6,6 +6,7 @@ export interface LovelaceBaseSectionConfig { title?: string; visibility?: Condition[]; column_span?: number; + row_span?: number; } export interface LovelaceSectionConfig extends LovelaceBaseSectionConfig { diff --git a/src/panels/lovelace/views/hui-sections-view.ts b/src/panels/lovelace/views/hui-sections-view.ts index eb806b625f..6a4851ab0e 100644 --- a/src/panels/lovelace/views/hui-sections-view.ts +++ b/src/panels/lovelace/views/hui-sections-view.ts @@ -166,6 +166,8 @@ export class SectionsView extends LitElement implements LovelaceViewElement { maxColumnCount ); + const rowSpan = sectionConfig?.row_span || 1; + (section as any).itemPath = [idx]; return html` @@ -173,6 +175,7 @@ export class SectionsView extends LitElement implements LovelaceViewElement { class="section" style=${styleMap({ "--column-span": columnSpan, + "--row-span": rowSpan, })} > ${ @@ -332,6 +335,7 @@ export class SectionsView extends LitElement implements LovelaceViewElement { .section { border-radius: var(--ha-card-border-radius, 12px); grid-column: span var(--column-span); + grid-row: span var(--row-span); } .section:has(hui-section[hidden]) {