diff --git a/src/clock-weather-card.ts b/src/clock-weather-card.ts index 243cdff0..f5c90b42 100644 --- a/src/clock-weather-card.ts +++ b/src/clock-weather-card.ts @@ -59,10 +59,6 @@ const gradientMap: Map = new Map() @customElement('clock-weather-card') // eslint-disable-next-line @typescript-eslint/no-unused-vars export class ClockWeatherCard extends LitElement { - public static getStubConfig(): Record { - return {}; - } - // https://lit.dev/docs/components/properties/ @property({ attribute: false }) public hass!: HomeAssistant; @@ -77,6 +73,14 @@ export class ClockWeatherCard extends LitElement { setTimeout(() => { this.currentDate = new Date() }, msToNextMinute); } + public static getStubConfig(): Record { + return {}; + } + + public getCardSize(): number { + return 3 + roundUp(this.config.forecast_days / 2); + } + // https://lit.dev/docs/components/properties/#accessors-custom public setConfig(config: ClockWeatherCardConfig): void { if (!config) {