Improve weather forecast card layout #23704
Open
+57
−29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
The weather forecast card is rather space in-efficient and includes a lot of empty space. Here is a screenshot of the weather card, showing 1. Current Weather (2 rows), 2. Hourly forecast (3 rows), 3. Daily forefast (3 rows), 4. Current Weather and Daily Forecast (4 rows), and 5. Current weather and Hourly forecast (4 rows). In particular around 2. and 5. there is a lot of empty vertical space.
I think it looks now a little more similar to the tile cards, although the size could probably be compressed further still.
This pull request adjusts the styling of the cards to enable them to fit them into slighty fewer rows.
I have also added a configuration option to adjust the number of forecast slots to show. The default is still 5 to not change existing installations (but in my opinion 7 looks better).
Type of change
Example configuration
Additional information
I have added a new localization string "ui.panel.lovelace.editor.card.weather-forecast.forecast_slots".
Checklist
If user exposed functionality or configuration variables are added/changed: