Debian Codegraph @

intents/responses/ru/HassGetState.yaml

raw symbols SCIP
1 language: ru
2 responses:
3 intents:
4 HassGetState:
5 # the number of names returned is limited to 4, in case there are more, the first 3 names and the remaining count is returned
6 # with 4 names or less, the names are joined with a comma ", " and the last name is joined with " and "
7 one: |
8 {% if state.state_with_unit == 'open': %}
9 Открыто
10 {% elif state.state_with_unit == 'closed': %}
11 Закрыто
12 {% elif state.state_with_unit == 'on': %}
13 Включено
14 {% elif state.state_with_unit == 'off': %}
15 Выключено
16 {% else %}
17 {{ slots.name | capitalize }} {{ state.state_with_unit }}
18 {% endif %}
19
20 one_yesno: |
21 {% if query.matched %}
22 Да
23 {% else %}
24 Нет, {{ state.state_with_unit }}
25 {% endif %}
26
27 any: |
28 {% if query.matched %}
29 {% set match = query.matched | map(attribute="name") | sort | list %}
30 {% if match | length > 4 %}
31 Да, {{ match[:3] | join(", ") }} и ещё {{ (match | length - 3) }}
32 {%- else -%}
33 Да,
34 {% for name in match -%}
35 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} и {% endif -%}
36 {{ name }}
37 {%- endfor -%}
38 {% endif %}
39 {% else %}
40 Нет
41 {% endif %}
42
43 all: |
44 {% if not query.unmatched: %}
45 Да
46 {% else %}
47 {% set no_match = query.unmatched | map(attribute="name") | sort | list %}
48 {% if no_match | length > 4 %}
49 {{ no_match[:3] | join(", ") }} и ещё {{ (no_match | length - 3) }} — нет
50 {%- else -%}
51 {% for name in no_match -%}
52 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} и {% endif -%}
53 {{ name }} — нет
54 {%- endfor %}
55 {% endif %}
56 {% endif %}
57
58 which: |
59 {% if not query.matched %}
60 Никакие
61 {% else: %}
62 {% set match = query.matched | map(attribute="name") | sort | list %}
63 {% if match | length > 4 %}
64 {{ match[:3] | join(", ") }} и ещё {{ (match | length - 3) }}
65 {% else %}
66 {%- for name in match -%}
67 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} и {% endif -%}
68 {{ name }}
69 {%- endfor -%}
70 {% endif %}
71 {% endif %}
72
73 how_many: |
74 {{ query.matched | length }}
75
76 sensor_value: |
77 Текущее значение: {{ state.state_with_unit | replace('.', ',') }}
78
79 sensor_value_temperature: |
80 Температура {{ state.state_with_unit | replace('.', ',') }}