diff --git a/src/panels/lovelace/card-features/hui-card-features.ts b/src/panels/lovelace/card-features/hui-card-features.ts
index 9e0e41672a..4fba3fa80e 100644
--- a/src/panels/lovelace/card-features/hui-card-features.ts
+++ b/src/panels/lovelace/card-features/hui-card-features.ts
@@ -75,7 +75,7 @@ export class HuiCardFeatures extends LitElement {
return nothing;
}
- if (this.layout?.type === "compact") {
+ if (this.layout === "compact") {
const currentFeature = this.features[this._currentFeatureIndex];
return html`
@@ -95,7 +95,7 @@ export class HuiCardFeatures extends LitElement {
`;
}
- const containerClass = this.layout?.type ? ` ${this.layout.type}` : "";
+ const containerClass = this.layout ? ` ${this.layout}` : "";
return html`
diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts
index 9fe06bb77f..791bace387 100644
--- a/src/panels/lovelace/cards/hui-tile-card.ts
+++ b/src/panels/lovelace/cards/hui-tile-card.ts
@@ -126,12 +126,12 @@ export class HuiTileCard extends LitElement implements LovelaceCard {
grid_columns: 2,
grid_rows: 1,
};
- const featureLayoutType = this._config?.feature_layout?.type || "vertical";
+ const featureLayout = this._config?.feature_layout || "vertical";
if (this._config?.features?.length) {
- if (featureLayoutType === "compact") {
+ if (featureLayout === "compact") {
options.grid_rows += 1;
- } else if (featureLayoutType === "horizontal") {
+ } else if (featureLayout === "horizontal") {
options.grid_rows += 1;
options.grid_columns = 4;
} else {
diff --git a/src/panels/lovelace/cards/types.ts b/src/panels/lovelace/cards/types.ts
index d8f568e34e..a845cde96f 100644
--- a/src/panels/lovelace/cards/types.ts
+++ b/src/panels/lovelace/cards/types.ts
@@ -24,9 +24,7 @@ export type AlarmPanelCardConfigState =
| "arm_vacation"
| "arm_custom_bypass";
-export type LovelaceCardFeatureLayout = {
- type?: "vertical" | "horizontal" | "compact";
-};
+export type LovelaceCardFeatureLayout = "vertical" | "horizontal" | "compact";
export interface AlarmPanelCardConfig extends LovelaceCardConfig {
entity: string;
diff --git a/src/panels/lovelace/editor/structs/card-feature-struct.ts b/src/panels/lovelace/editor/structs/card-feature-struct.ts
index e7c7fe59cc..892f688df2 100644
--- a/src/panels/lovelace/editor/structs/card-feature-struct.ts
+++ b/src/panels/lovelace/editor/structs/card-feature-struct.ts
@@ -2,9 +2,5 @@ import { any, array, enums, object, optional } from "superstruct";
export const cardFeatureConfig = object({
features: optional(array(any())),
- feature_layout: optional(
- object({
- type: enums(["vertical", "horizontal", "compact"]),
- })
- ),
+ feature_layout: optional(enums(["vertical", "horizontal", "compact"])),
});