mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 12:56:37 +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) {
|
if (this._config?.show_forecast !== false) {
|
||||||
rows += 1;
|
rows += 1;
|
||||||
min_rows += 1;
|
min_rows += 1;
|
||||||
}
|
|
||||||
if (this._config?.forecast_type === "daily") {
|
if (this._config?.forecast_type === "daily") {
|
||||||
rows += 1;
|
rows += 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
columns: 12,
|
columns: 12,
|
||||||
rows: rows,
|
rows: rows,
|
||||||
|
@ -57,7 +57,7 @@ export class HuiWeatherForecastCardEditor
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
/* cannot show forecast in case it is unavailable on the entity */
|
/* 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 */
|
/* cannot hide both weather and forecast, need one of them */
|
||||||
(config.show_current === false && config.show_forecast === false)
|
(config.show_current === false && config.show_forecast === false)
|
||||||
) {
|
) {
|
||||||
@ -65,6 +65,7 @@ export class HuiWeatherForecastCardEditor
|
|||||||
fireEvent(this, "config-changed", {
|
fireEvent(this, "config-changed", {
|
||||||
config: { ...config, show_current: true, show_forecast: false },
|
config: { ...config, show_current: true, show_forecast: false },
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
!config.forecast_type ||
|
!config.forecast_type ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user