Debian Codegraph @

intents/responses/ru/HassClimateSetTemperature.yaml

raw symbols SCIP
1 language: ru
2 responses:
3 intents:
4 HassClimateSetTemperature:
5 # Extract the last integer digit from number and use it to select the right word ending
6 default: >-
7 Температура установлена на {{ slots.temperature }}
8 {% set temp = slots.temperature | float(default=none) %}
9 {% if temp is not none %}
10 {% set last_digit = temp | abs | int % 10 %}
11 {% set last_two_digits = temp | abs | int % 100 %}
12 {% if last_digit == 1 and last_two_digits != 11 %}
13 градус
14 {% elif last_digit in [2, 3, 4] and (last_two_digits < 10 or last_two_digits > 20) %}
15 градуса
16 {% else %}
17 градусов
18 {% endif %}
19 {% endif %}