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