diff --git a/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts index 0f48a3b1dc..a8b9442e19 100644 --- a/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-weather-forecast-card-editor.ts @@ -58,6 +58,7 @@ export class HuiWeatherForecastCardEditor } if ( !config.forecast_type || + (config.forecast_type === "legacy" && this._modernForecastSupported()) || !this._forecastSupported(config.forecast_type) ) { let forecastType: string | undefined; @@ -114,6 +115,14 @@ export class HuiWeatherForecastCardEditor return false; } + private _modernForecastSupported(): boolean { + return ( + this._forecastSupported("daily") || + this._forecastSupported("hourly") || + this._forecastSupported("twice_daily") + ); + } + private _schema = memoizeOne( ( localize: LocalizeFunc,