Created
September 10, 2023 07:18
-
-
Save bphermansson/b889b73372f24e853f0c3180647849b4 to your computer and use it in GitHub Desktop.
Template for Home Assistant to get prediction from the SMHI integration in swedish language
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prediction: | |
friendly_name: "Weather prediction" | |
value_template: >- | |
{%- set state = states('weather.smhi_home') -%} | |
{% if state == 'clear-night' %} klart, natt | |
{% elif state == 'cloudy' %} molnigt | |
{% elif state == 'exceptional' %} exceptionellt | |
{% elif state == 'fog' %} dimma | |
{% elif state == 'hail' %} hagel | |
{% elif state == 'lightning' %} åska | |
{% elif state == 'lightning-rainy' %} åska, regn | |
{% elif state == 'partlycloudy' %} delvis molnigt | |
{% elif state == 'pouring' %} ösregn | |
{% elif state == 'rainy' %} regnigt | |
{% elif state == 'snowy' %} snöigt | |
{% elif state == 'snowy-rainy' %} snöblandat regn | |
{% elif state == 'sunny' %} soligt | |
{% elif state == 'windy' %} blåsigt | |
{% elif state == 'windy-variant' %} vindbyar | |
{% else %} Okänt väder | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment