Will it be finally recognized the weather components should also use correct icons for ‘night’ conditions?
Seems to silly for words this would need an architecture discussion…
at midnight this is displayed on Buienradar:
while in fact it is:
please lets give this some traction, there’s an icon issue on Github, so we aren’t forced to create templates for this in other cards.
mdi has 2 nice icons for nightly conditions
weather-night
and weather-night-partly-cloudy
so please lets use these in stead of needing this:
{% set mapper_icon =
{'partly-cloudy-night': 'night-partly-cloudy'} %}
{% set mapper_br =
{'pouring': 'pouring',
'lightning-rainy': 'lightning-rainy',
'snowy-rainy': 'snowy-rainy'} %}
{% set mapper_ds =
{'clear-day': 'sunny',
'clear-night': 'night',
'sunny': 'sunny',
'rainy': 'rainy',
'snow': 'snowy',
'sleet': 'snowy-rainy',
'wind': 'windy',
'fog': 'fog',
'cloudy': 'cloudy',
'partlycloudy': 'partly-cloudy',
'partly-cloudy-day': 'partly-cloudy',
'partly-cloudy-night': 'night-partly-cloudy',
'hail': 'hail',
'thunderstorm': 'lightning',
'tornado': 'hurricane'} %}
{% set icon = states('sensor.dark_sky_icon') %}
{% set dark = states('weather.home_darksky') %}
{% set woensdrecht = states('weather.woensdrecht') %}
{% set weather = mapper_icon[icon] if icon in mapper_icon else
mapper_br[woensdrecht] if woensdrecht in mapper_br else
mapper_ds[dark] if dark in mapper_ds else 'sunny-alert' %}
mdi:weather-{{weather}}
…