Yevgenium / weather-chart-card

Custom weather card with charts
MIT License
276 stars 80 forks source link

fix: handle exceptional weather state #97

Closed troinine closed 2 years ago

troinine commented 2 years ago

If the associated weather entity state or any of the forecast states are exceptional as specified in the Condition mappings of the Weather integration the card behaviour is not optional. With default icons the card renders with no icon on the current weather state and missing icons in the forecasts as shown in the following screenshot:

Screenshot 2022-03-10 at 21 24 27

When using custom icons the card renders with missing images as follows:

Screenshot 2022-03-10 at 21 26 15

This change fixes both scenarios so that when using the default icons, the card renders using mdi:alert-circle-outline. This icon is also used by the built-in Home Assistant frontend weather forecast card

When using custom icons, the card refers to exceptional.svg file in the custom icons folder. Working versions:

Default icons:

Screenshot 2022-03-10 at 21 38 14

Custom icons:

Screenshot 2022-03-10 at 21 37 17

Yevgenium commented 2 years ago

Thanks!