Debian Codegraph @

intents/responses/lv/HassGetState.yaml

raw symbols SCIP
1 language: lv
2 responses:
3 intents:
4 HassGetState:
5 default: "{{ state.state_with_unit }}" # used mostly for custom sentences
6
7 one_yesno: |
8 {% if query.matched %}
9 Jā
10 {% else %}
11 Nē
12 {% endif %}
13
14 any: |
15 {% if query.matched %}
16 {% set match = query.matched | map(attribute="name") | sort | list %}
17 {% if match | length > 4 %}
18 Jā, {{ match[:3] | join(", ") }} un vēl {{ match | length - 3 }} citi
19 {%- else -%}
20 Jā,
21 {% for name in match -%}
22 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} un {% endif %}
23 {{ name }}
24 {%- endfor -%}
25 {% endif %}
26 {% else %}
27 Nē
28 {% endif %}
29
30 all: |
31 {% if not query.unmatched: %}
32 Jā
33 {% else %}
34 {% set no_match = query.unmatched | map(attribute="name") | sort | list %}
35 {% if no_match | length > 4 %}
36 Nē, {{ no_match[:3] | join(", ") }} un {{ no_match | length - 3 }} citi nav
37 {%- else -%}
38 Nē,
39 {% for name in no_match -%}
40 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} un {% endif %}
41 {{ name }}
42 {%- endfor %} nav
43 {% endif %}
44 {% endif %}
45
46 which: |
47 {% if not query.matched %}
48 {% if slots.device_class in ["battery", "cold", "presence", "light"] %}
49 Neviena
50 {% else %}
51 Neviens
52 {% endif %}
53 {% else: %}
54 {% set match = query.matched | map(attribute="name") | sort | list %}
55 {% if match | length > 4 %}
56 {{ match[:3] | join(", ") }} un {{ (match | length - 3) }} citi
57 {% else %}
58 {%- for name in match -%}
59 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} un {% endif %}
60 {{ name }}
61 {%- endfor -%}
62 {% endif %}
63 {% endif %}
64
65 how_many: |
66 {{ query.matched | length }}