diff --git a/src/components/ha-grid-size-picker.ts b/src/components/ha-grid-size-picker.ts
index 453a24cb8d30..6ae6b7b37d75 100644
--- a/src/components/ha-grid-size-picker.ts
+++ b/src/components/ha-grid-size-picker.ts
@@ -10,7 +10,7 @@ import { HomeAssistant } from "../types";
import { conditionalClamp } from "../common/number/clamp";
type GridSizeValue = {
- rows?: number;
+ rows?: number | "auto";
columns?: number;
};
@@ -47,6 +47,16 @@ export class HaGridSizeEditor extends LitElement {
this.columnMin !== undefined && this.columnMin === this.columnMax;
const disabledRows =
this.rowMin !== undefined && this.rowMin === this.rowMax;
+
+ const autoHeight = this._localValue?.rows === "auto";
+
+ const rowMin = this.rowMin ?? 1;
+ const rowMax = this.rowMax ?? this.rows;
+ const columnMin = this.columnMin ?? 1;
+ const columnMax = this.columnMax ?? this.columns;
+ const rowValue = autoHeight ? rowMin : this._localValue?.rows;
+ const columnValue = this._localValue?.columns;
+
return html`
+
@@ -215,10 +226,6 @@ export class HaGridSizeEditor extends LitElement {
opacity: 0.2;
cursor: pointer;
}
- .preview .cell[disabled] {
- opacity: 0.05;
- cursor: initial;
- }
.selected {
pointer-events: none;
}
diff --git a/src/panels/lovelace/editor/card-editor/ha-grid-layout-slider.ts b/src/panels/lovelace/editor/card-editor/ha-grid-layout-slider.ts
index ab1bebf00fcc..cfbbd31c3aec 100644
--- a/src/panels/lovelace/editor/card-editor/ha-grid-layout-slider.ts
+++ b/src/panels/lovelace/editor/card-editor/ha-grid-layout-slider.ts
@@ -378,6 +378,9 @@ export class HaGridLayoutSlider extends LitElement {
:host(:disabled) .handle:after {
background: var(--disabled-color);
}
+ :host(:disabled) .active {
+ background: var(--disabled-color);
+ }
.pressed .handle {
transition: none;
}
diff --git a/src/panels/lovelace/editor/card-editor/hui-card-layout-editor.ts b/src/panels/lovelace/editor/card-editor/hui-card-layout-editor.ts
index 5a5690727ce6..ac32343f75e9 100644
--- a/src/panels/lovelace/editor/card-editor/hui-card-layout-editor.ts
+++ b/src/panels/lovelace/editor/card-editor/hui-card-layout-editor.ts
@@ -11,8 +11,10 @@ import "../../../../components/ha-button-menu";
import "../../../../components/ha-grid-size-picker";
import "../../../../components/ha-icon-button";
import "../../../../components/ha-list-item";
+import "../../../../components/ha-settings-row";
import "../../../../components/ha-slider";
import "../../../../components/ha-svg-icon";
+import "../../../../components/ha-switch";
import "../../../../components/ha-yaml-editor";
import type { HaYamlEditor } from "../../../../components/ha-yaml-editor";
import { LovelaceCardConfig } from "../../../../data/lovelace/config/card";
@@ -61,11 +63,13 @@ export class HuiCardLayoutEditor extends LitElement {
this._defaultLayoutOptions
);
+ const sizeValue = this._gridSizeValue(options);
+
return html`