Debian Codegraph @

intents/responses/cs/HassGetState.yaml

raw
1 language: cs
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 default: "{{ state.state_with_unit }}" # used mostly for custom sentences
8
9 one: |
10 {{ slots.name | capitalize }} je {{ state.state_with_unit }}
11
12 one_light: |
13 Světlo {{ slots.name | capitalize }} je {{ state.state_with_unit }}
14
15 one_scene: |
16 Scéna {{ slots.name | capitalize }} je {{ state.state_with_unit }}
17
18 one_cover: |
19 {% set present_continuous = ('je', 'jí', 'rá') %}
20 {% set present_simple = ('no', 'ná', 'né') %}
21
22 {{ slots.name | capitalize }} {{ 'se' if state.state_with_unit.endswith(present_continuous) else 'je' }} {{ state.state_with_unit }}
23
24 one_yesno: |
25 {% set present_continuous = ('je', 'jí', 'rá') %}
26 {% set present_simple = ('no', 'ná', 'né') %}
27
28 {% if query.matched %}
29 Ano
30 {% else %}
31 Ne, {{ state.state_with_unit }}
32 {% endif %}
33
34 bs_yesno: |
35 {% if query.matched %}
36 Ano
37 {% else %}
38 Ne
39 {% endif %}
40
41 any: |
42 {% if query.matched %}
43 {% set match = query.matched | map(attribute="name") | sort | list %}
44 {% if match | length > 4 %}
45 Ano, {{ match[:3] | join(", ") }} a {{ (match | length - 3) }} další
46 {%- else -%}
47 Ano,
48 {% for name in match -%}
49 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} a {% endif -%}
50 {{ name }}
51 {%- endfor -%}
52 {% endif %}
53 {% else %}
54 Ne
55 {% endif %}
56
57 all: |
58 {% if not query.unmatched: %}
59 Ano
60 {% else %}
61 {% set no_match = query.unmatched | map(attribute="name") | sort | list %}
62 {% if no_match | length > 4 %}
63 Ne, {{ no_match[:3] | join(", ") }} a {{ (no_match | length - 3) }} další jsou {{ state.state_with_unit }}
64 {%- else -%}
65 Ne,
66 {% if state.state_with_unit == "home" %}
67 {% set state_with_unit = "doma" %}
68 {% elif state.state_with_unit == "not_home" %}
69 {% set state_with_unit = "mimo domov" %}
70 {% else %}
71 {% set state_with_unit = state.state_with_unit %}
72 {% endif %}
73 {% for name in no_match -%}
74 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} a {% endif -%}
75 {{ name }}
76 {%- endfor %} {{ 'není' if no_match | length == 1 else 'nejsou'}} {{ state_with_unit }}
77 {% endif %}
78 {% endif %}
79
80 bs_all: |
81 {% if not query.unmatched: %}
82 Ano
83 {% else %}
84 {% set no_match = query.unmatched | map(attribute="name") | sort | list %}
85 {% if no_match | length > 4 %}
86 Ne, {{ no_match[:3] | join(", ") }} a {{ (no_match | length - 3) }} další nejsou
87 {%- else -%}
88 Ne,
89 {% for name in no_match -%}
90 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} a {% endif -%}
91 {{ name }}
92 {%- endfor %} {{ 'není' if no_match | length == 1 else 'nejsou'}}
93 {% endif %}
94 {% endif %}
95
96 which: |
97 {% if not query.matched %}
98 Žádné
99 {% else: %}
100 {% set match = query.matched | map(attribute="name") | sort | list %}
101 {% if match | length > 4 %}
102 {{ match[:3] | join(", ") }} a {{ (match | length - 3) }} další
103 {% else %}
104 {%- for name in match -%}
105 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} a {% endif -%}
106 {{ name }}
107 {%- endfor -%}
108 {% endif %}
109 {% endif %}
110
111 how_many: |
112 {{ query.matched | length }}
113
114 where: |
115 {% if state.state == "not_home" %}
116 {{ slots.name | capitalize }} je mimo domov
117 {% elif state.state == "home" %}
118 {{ slots.name | capitalize }} je doma
119 {% else %}
120 {{ slots.name | capitalize }} je v zóně {{ state.state }}
121 {% endif %}