I try to change the icons in Weather Underground, but i get a question mark instead of the good icon, herse is my script:
- platform: template
sensors:
pws_weather_template:
friendly_name: 'Weersverwachting'
value_template: "{{ states('sensor.pws_weather') }}"
icon_template: >
{% if is_state('sensor.pws_weather_icon', 'clear') %}
mdi:weather-sunny
{% elif is_state('sensor.pws_weather_icon', 'nt_clear') %}
mdi:weather-night
{% elif is_state('sensor.pws_weather_icon', 'rain') %}
mdi:weather-rainy
{% elif is_state('sensor.pws_weather_icon', 'snow') %}
mdi:weather-snowy
{% elif is_state('sensor.pws_weather_icon', 'sleet') %}
mdi:weather-snowy-rainy
{% elif is_state('sensor.pws_weather_icon', 'wind') %}
mdi:weather-windy-variant
{% elif is_state('sensor.pws_weather_icon', 'fog') %}
mdi:weather-fog
{% elif is_state('sensor.pws_weather_icon', 'cloudy') %}
mdi:weather-cloudy
{% elif is_state('sensor.pws_weather_icon', 'partlycloudy') or is_state('sensor.pws_weather_icon', 'nt_partlycloudy') %}
mdi:weather-partlycloudy
{% elif is_state('sensor.pws_weather_icon', 'hail') %}
mdi:weather-hail
{% elif is_state('sensor.pws_weather_icon', 'thunderstorm') %}
mdi:weather-lightning
{% else %}
mdi:help-circle
{% endif %}