mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 12:26:35 +00:00
Fix some weather-forecast card editor issues (#26125)
This commit is contained in:
parent
fc104a7992
commit
1ded254e5a
@ -464,10 +464,11 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
if (this._config?.show_forecast !== false) {
|
||||
rows += 1;
|
||||
min_rows += 1;
|
||||
if (this._config?.forecast_type === "daily") {
|
||||
rows += 1;
|
||||
}
|
||||
}
|
||||
if (this._config?.forecast_type === "daily") {
|
||||
rows += 1;
|
||||
}
|
||||
|
||||
return {
|
||||
columns: 12,
|
||||
rows: rows,
|
||||
|
@ -57,7 +57,7 @@ export class HuiWeatherForecastCardEditor
|
||||
|
||||
if (
|
||||
/* cannot show forecast in case it is unavailable on the entity */
|
||||
(config.show_forecast === true && this._hasForecast === false) ||
|
||||
(config.show_forecast !== false && this._hasForecast === false) ||
|
||||
/* cannot hide both weather and forecast, need one of them */
|
||||
(config.show_current === false && config.show_forecast === false)
|
||||
) {
|
||||
@ -65,6 +65,7 @@ export class HuiWeatherForecastCardEditor
|
||||
fireEvent(this, "config-changed", {
|
||||
config: { ...config, show_current: true, show_forecast: false },
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (
|
||||
!config.forecast_type ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user