Fix unwanted split in the Home view

HASS "masonry" view split the cards into multiple columns if sections
get "too large". This change will force the default sections into a
single vertical stack, while the extra_cards section is allowed to be
moved by HASS.
This commit is contained in:
DigiLive
2025-05-23 08:58:05 +02:00
parent 93bebd4f47
commit d168de024b

View File

@ -26,16 +26,6 @@ class HomeView extends AbstractView {
/** The domain of the entities that the view is representing. */
static readonly domain = 'home' as const;
/** Returns the default configuration object for the view. */
static getDefaultConfig(): ViewConfig {
return {
title: localize('generic.home'),
icon: 'mdi:home-assistant',
path: 'home',
subview: false,
};
}
/**
* Class constructor.
*
@ -47,6 +37,16 @@ class HomeView extends AbstractView {
this.baseConfiguration = { ...this.baseConfiguration, ...HomeView.getDefaultConfig(), ...customConfiguration };
}
/** Returns the default configuration object for the view. */
static getDefaultConfig(): ViewConfig {
return {
title: localize('generic.home'),
icon: 'mdi:home-assistant',
path: 'home',
subview: false,
};
}
/**
* Create the configuration of the cards to include in the view.
*
@ -116,7 +116,12 @@ class HomeView extends AbstractView {
homeViewCards.push(...Registry.strategyOptions.extra_cards);
}
return homeViewCards;
return [
{
type: 'vertical-stack',
cards: homeViewCards,
},
];
}
/**