Debian Codegraph @

intents/responses/ca/HassGetState.yaml

raw
1 language: ca
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 L'estat del dispositiu {{ slots.name | capitalize }} és {{ state.state_with_unit }}
9
10 one_yesno: |
11 {% set negation = {
12 "window": "està",
13 "door": "està",
14 "battery": "està"
15 } %}
16 {% if query.matched %}
17 Si
18 {% else %}
19 No, {{ negation.get(slots.device_class, "és") }} {{ state.state_with_unit }}
20 {% endif %}
21
22 any: |
23 {% if query.matched %}
24 {% set match = query.matched | map(attribute="name") | sort | list %}
25 {% if match | length > 4 %}
26 Si, {{ match[:3] | join(", ") }} i uns altres {{ (match | length - 3) }} més
27 {%- else -%}
28 Si,
29 {% for name in match -%}
30 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} i {% endif -%}
31 {{ name }}
32 {%- endfor -%}
33 {% endif %}
34 {% else %}
35 No
36 {% endif %}
37
38 all: |
39 {% if not query.unmatched: %}
40 Si
41 {% else %}
42 {% set no_match = query.unmatched | map(attribute="name") | sort | list %}
43 {% if no_match | length > 4 %}
44 No, ni {{ no_match[:3] | join(", ") }} ni els altres {{ (no_match | length - 3) }} ho són
45 {% elif no_match | length == 1 %}
46 No, el dispositiu {{ no_match|first }} no
47 {%- else -%}
48 No, ni
49 {% for name in no_match -%}
50 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} ni {% endif -%}
51 {{ name }}
52 {%- endfor %}
53 {% endif %}
54 {% endif %}
55
56 which: |
57 {% if not query.matched %}
58 Cap dispositiu
59 {% else: %}
60 {% set match = query.matched | map(attribute="name") | sort | list %}
61 {% if match | length > 4 %}
62 {{ match[:3] | join(", ") }} i uns altres {{ (match | length - 3) }} més
63 {% else %}
64 {%- for name in match -%}
65 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} i {% endif -%}
66 {{ name }}
67 {%- endfor -%}
68 {% endif %}
69 {% endif %}
70
71 how_many: |
72 {{ query.matched | length }}
73
74 where: |
75 {% if not query.matched %}
76 No conec a ningú que es digui {{ slots.name | capitalize }}
77 {% else %}
78 {% if state == "not_home" %}
79 {{ slots.name | capitalize }} és a fora
80 {% elif state == "home" %}
81 {{ slots.name | capitalize }} és a casa
82 {% else %}
83 {{ slots.name | capitalize }} es troba a {{ state.state }}
84 {% endif %}
85 {% endif %}