From 835d52013bb0499ab60bf834a5f8696ca10f618c Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 3 Apr 2024 17:42:02 +0200 Subject: [PATCH] Don't fit grid with multiline secondary option in template card --- src/cards/template-card/template-card.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cards/template-card/template-card.ts b/src/cards/template-card/template-card.ts index 25cd66dd4..498c6fa61 100644 --- a/src/cards/template-card/template-card.ts +++ b/src/cards/template-card/template-card.ts @@ -91,18 +91,21 @@ export class TemplateCard extends MushroomBaseElement implements LovelaceCard { public getLayoutOptions(): LovelaceLayoutOptions { this._inGrid = true; - const options = { + const options: LovelaceLayoutOptions = { grid_columns: 2, grid_rows: 1, }; if (!this._config) return options; const appearance = computeAppearance(this._config); if (appearance.layout === "vertical") { - options.grid_rows += 1; + options.grid_rows! += 1; } if (appearance.layout === "horizontal") { options.grid_columns = 4; } + if (this._config?.multiline_secondary) { + options.grid_rows = undefined + } return options; }