Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% for day in range(1, 6) %}
- {%- set forecast_index = 1 + day - 1 -%}
- {%- set state = state_attr('weather.forecast_nilsen_goberg', 'forecast')[forecast_index].condition -%}
- Været for dag {{ day }}:
- {% if state == 'clear-night' %} Klar natt
- {% elif state == 'cloudy' %} Overskyet
- {% elif state == 'exceptional' %} Fantastisk
- {% elif state == 'fog' %} Tåke
- {% elif state == 'hail' %} Hagl
- {% elif state == 'lightning' %} Torden
- {% elif state == 'lightning-rainy' %} Torden, regn
- {% elif state == 'partlycloudy' %} Delvis overskyet
- {% elif state == 'pouring' %} Pøsregn
- {% elif state == 'rainy' %} Regn
- {% elif state == 'snowy' %} Snø
- {% elif state == 'snowy-rainy' %} Sludd
- {% elif state == 'sunny' %} Sol
- {% elif state == 'windy' %} Vind
- {% elif state == 'windy-variant' %} Vind
- {% else %} Vet ikke
- {% endif %}
- {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement