Debian Codegraph @

intents/responses/da/HassGetState.yaml

raw
1 language: da
2 responses:
3 intents:
4 HassGetState:
5 default: "{{ state.state_with_unit }}" # used mostly for custom sentences
6
7 # the number of names returned is limited to 4, in case there are more, the first 3 names and the remaining count is returned
8 # with 4 names or less, the names are joined with a comma ", " and the last name is joined with " and "
9 one: |
10 {{ slots.name | capitalize }} er {{ state.state_with_unit }}
11
12 one_yesno: |
13 {% if query.matched %}
14 Ja
15 {% else %}
16 Nej, {{ state.state_with_unit }}
17 {% endif %}
18
19 any: |
20 {% if query.matched %}
21 {% set match = query.matched | map(attribute="name") | sort | list %}
22 {% if match | length > 4 %}
23 Ja, {{ match[:3] | join(", ") }} og {{ (match | length - 3) }} mere
24 {%- else -%}
25 Ja,
26 {% for name in match -%}
27 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} og {% endif -%}
28 {{ name }}
29 {%- endfor -%}
30 {% endif %}
31 {% else %}
32 Nej
33 {% endif %}
34
35 all: |
36 {% if not query.unmatched: %}
37 Ja
38 {% else %}
39 {% set no_match = query.unmatched | map(attribute="name") | sort | list %}
40 {% if no_match | length > 4 %}
41 Nej, ikke {{ no_match[:3] | join(", ") }} og {{ (no_match | length - 3) }} mere
42 {%- else -%}
43 Nej, ikke
44 {% for name in no_match -%}
45 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} og {% endif -%}
46 {{ name }}
47 {%- endfor %}
48 {% endif %}
49 {% endif %}
50
51 which: |
52 {% if not query.matched %}
53 Ikke nogen
54 {% else: %}
55 {% set match = query.matched | map(attribute="name") | sort | list %}
56 {% if match | length > 4 %}
57 {{ match[:3] | join(", ") }} og {{ (match | length - 3) }} mere
58 {% else %}
59 {%- for name in match -%}
60 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} og {% endif -%}
61 {{ name }}
62 {%- endfor -%}
63 {% endif %}
64 {% endif %}
65
66 how_many: |
67 {{ query.matched | length }}
68
69 where: |
70 {% if state.state == "not_home" %}
71 {{ slots.name | capitalize }} er ikke hjemme
72 {% elif state.state == "home" %}
73 {{ slots.name | capitalize }} er hjemme
74 {% else %}
75 {{ slots.name | capitalize }} er i zonen {{ state.state }}
76 {% endif %}