Hello everyone.
I have an automation that triggered everynight at 21:00 which tells me tomorrows Forecast taken from Accuweather. The message is delivered via a telegram bot. Message content is Turkish. There are 3 states taken from Accu : temperature, condition and humidity. Temperature and Humidity are numbers so I am ok with them. But condition is in English and no matter what I do, I can’t change it to Turkish.
Here is my code
service: notify.telegrambot
data:
message: >
Yarınki hava durumu{{ state_attr('weather.colak_ismail_2',
'forecast')[1].temperature }} drece, hava genel olarak {{
state_attr('weather.colak_ismail_2', 'forecast')[1].condition }} ve rüzgarın hızıda {{ state_attr('weather.colak_ismail_2', 'forecast')[1].wind_speed
}} km/h
As you can see everything comes up in Turkish but not the condition. If it is rainy it says rainy. Is there a way to convert weather states in that condition to another language ?
Someone in the forum has shared a code which has to be entered into configuration yaml to change the language to Russian but that trick did not work on me.
Here is the share value template
- platform: template
sensors:
current_weather:
value_template: >-
{%- set state = states('weather.home') -%}
{% if state == 'clear-night' %} Ясно, ночь
{% elif state == 'cloudy' %} Облачно
{% elif state == 'exceptional' %} Предупреждение
{% elif state == 'fog' %} Туман
{% elif state == 'hail' %} Град
{% elif state == 'lightning' %} Молния
{% elif state == 'lightning-rainy' %} Молния, дождь
{% elif state == 'partlycloudy' %} Переменная облачность
{% elif state == 'pouring' %} Ливень
{% elif state == 'rainy' %} Дождь
{% elif state == 'snowy' %} Снег
{% elif state == 'snowy-rainy' %} Снег с дождем
{% elif state == 'sunny' %} Ясно
{% elif state == 'windy' %} Ветрено
{% elif state == 'windy-variant' %} Ветрено
{% else %} Нет данных
{% endif %}