Fix button card and sensor card in grid section (#19887)

This commit is contained in:
Paul Bottein 2024-02-27 12:50:37 +01:00 committed by GitHub
parent bf56f50e0a
commit bf8a33e086
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -149,8 +149,8 @@ export class HuiButtonCard extends LitElement implements LovelaceCard {
public getGridSize(): [number, number] {
if (
(this._config?.show_icon && this._config?.show_name) ||
this._config?.show_state
this._config?.show_icon &&
(this._config?.show_name || this._config?.show_state)
) {
return [2, 2];
}

View File

@ -72,7 +72,7 @@ class HuiSensorCard extends HuiEntityCard {
super.setConfig(entityCardConfig);
}
public getSize(): [number, number] {
public getGridSize(): [number, number] {
return [2, 2];
}