Debian Codegraph @

intents/responses/sl/HassGetWeather.yaml

raw symbols SCIP
1 language: sl
2 responses:
3 intents:
4 HassGetWeather:
5 default: >
6 {% set weather_condition = {
7 'clear': 'in jasno',
8 'clear-night': 'in jasno',
9 'cloudy': 'in oblačno',
10 'exceptional': 'in izjemno',
11 'fog': 'z meglo',
12 'hail': 's točo',
13 'lightning': 'bliskovito',
14 'lightning-rainy': 'bliskovito in deževno',
15 'partlycloudy': 'in delno oblačno',
16 'pouring': 'z nalivi',
17 'rainy': 'in deževno',
18 'snowy': 'in snežno',
19 'snowy-rainy': 's snegom in dežjem',
20 'sunny': 'in sončno',
21 'windy': 'in vetrovno',
22 'windy-variant': 'z vetrom in oblaki'
23 } %}
24 {% set temperature = state.attributes.get('temperature') %}
25 {% if temperature is not none %}
26 {% set temperature_sl = (temperature|string).replace(".", ",") %}
27 {% set temperature_num = temperature | float %}
28 {% if temperature_num | abs == 1 %}
29 {{ temperature_sl }} stopinja
30 {% elif temperature_num | abs == 2 %}
31 {{ temperature_sl }} stopinji
32 {% elif temperature_num == 0 or temperature_num % 1 != 0 or temperature_num % 100 | abs < 20 %}
33 {{ temperature_sl }} stopinje
34 {% else %}
35 {{ temperature_sl }} stopinj
36 {% endif %}
37 {% else %}
38 Temperatura ni na voljo
39 {% endif %} {{ weather_condition.get((state.state | string).lower(), "") }}