decompil3d / lovelace-hourly-weather

Hourly weather card for Home Assistant. Visualize upcoming weather conditions as a colored horizontal bar.
MIT License
293 stars 31 forks source link

Adds an option to fill the forecast segment with icons #715

Closed scinos closed 1 month ago

scinos commented 1 month ago

(Comes from #669)

What problem does this PR solve?

Adds the option to add more than one icon per forecast span. This should improve readability, specially for wallboards.

Proposed solution

Adds a new config icon_fill with three possible values:

This is how it looks like:

image

Alternatively, we can have this as a boolean (icon_fill:false current behaviour, icon_fill:true fill all segments with icons), and introduce a second option icon_spacing (similar to label_spacing) to be able to space out the icons

scinos commented 1 month ago

@decompil3d I think I need some help with checking the config option icon_fill. I see there are config tests in two places:

Why do we need two? Which one should I use to test the validity of icon_fill option?

decompil3d commented 1 month ago

@decompil3d I think I need some help with checking the config option icon_fill. I see there are config tests in two places:

Why do we need two? Which one should I use to test the validity of icon_fill option?

I think checking validity in renderCore would be most consistent with the existing code. Thanks for checking.

scinos commented 1 month ago

@decompil3d added tests, this PR is ready for review now