| 1 |
language: fr |
| 2 |
responses: |
| 3 |
intents: |
| 4 |
HassGetState: |
| 5 |
|
| 6 |
|
| 7 |
default: | |
| 8 |
{{ state.state_with_unit }} |
| 9 |
|
| 10 |
one: | |
| 11 |
{{ slots.name | capitalize }} est {{ state.state_with_unit }} |
| 12 |
|
| 13 |
one_yesno: | |
| 14 |
{% if query.matched %} |
| 15 |
Oui |
| 16 |
{% else %} |
| 17 |
Non |
| 18 |
{% endif %} |
| 19 |
|
| 20 |
any: | |
| 21 |
{% if query.matched %} |
| 22 |
{% set match = query.matched | map(attribute="name") | sort | list %} |
| 23 |
{% set count_match = no_match | length | int %} |
| 24 |
{% if match | length > 4 %} |
| 25 |
Oui, {{ match[:3] | join(", ") }} et {{ (match | length - 3) }} autres |
| 26 |
{% elif match | length == 1 %} |
| 27 |
Oui, |
| 28 |
{% for name in match -%} |
| 29 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 30 |
{{ name }} |
| 31 |
{% endfor %} |
| 32 |
est {{ state.state_with_unit }} |
| 33 |
{%- else -%} |
| 34 |
Oui, |
| 35 |
{% for name in match -%} |
| 36 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 37 |
{{ name }} |
| 38 |
{% endfor %} |
| 39 |
sont {{ state.state_with_unit }} |
| 40 |
{% endif %} |
| 41 |
{% else %} |
| 42 |
Non |
| 43 |
{% endif %} |
| 44 |
|
| 45 |
any_short: | |
| 46 |
{% if query.matched %} |
| 47 |
{% set match = query.matched | map(attribute="name") | sort | list %} |
| 48 |
{% set count_match = no_match | length | int %} |
| 49 |
{% if match | length > 4 %} |
| 50 |
Oui, {{ match[:3] | join(", ") }} et {{ (match | length - 3) }} autres |
| 51 |
{% elif match | length == 1 %} |
| 52 |
Oui, |
| 53 |
{% for name in match -%} |
| 54 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 55 |
{{ name }} |
| 56 |
{% endfor %} |
| 57 |
{%- else -%} |
| 58 |
Oui, |
| 59 |
{% for name in match -%} |
| 60 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 61 |
{{ name }} |
| 62 |
{% endfor %} |
| 63 |
{% endif %} |
| 64 |
{% else %} |
| 65 |
Non |
| 66 |
{% endif %} |
| 67 |
|
| 68 |
any_super_short: | |
| 69 |
{% if query.matched %} |
| 70 |
Oui |
| 71 |
{% else %} |
| 72 |
Non |
| 73 |
{% endif %} |
| 74 |
|
| 75 |
all: | |
| 76 |
{% if not query.unmatched: %} |
| 77 |
Oui |
| 78 |
{% else %} |
| 79 |
{% set no_match = query.unmatched | map(attribute="name") | sort | list %} |
| 80 |
{% set count_match = no_match | length | int %} |
| 81 |
{% if no_match | length > 4 %} |
| 82 |
Non,pas {{ no_match[:3] | join(", ") }} et {{ (no_match | length - 3) }} autres |
| 83 |
{% elif no_match | length == 1 %} |
| 84 |
Non, pas |
| 85 |
{% for name in no_match -%} |
| 86 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 87 |
{{ name }} |
| 88 |
{%- endfor %} |
| 89 |
{%- else -%} |
| 90 |
Non, pas |
| 91 |
{% for name in no_match -%} |
| 92 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 93 |
{{ name }} |
| 94 |
{%- endfor %} |
| 95 |
{% endif %} |
| 96 |
{% endif %} |
| 97 |
|
| 98 |
all_super_short: | |
| 99 |
{% if not query.unmatched: %} |
| 100 |
Oui |
| 101 |
{% else %} |
| 102 |
Non |
| 103 |
{% endif %} |
| 104 |
|
| 105 |
which: | |
| 106 |
{% if not query.matched %} |
| 107 |
Aucun appareil |
| 108 |
{% else: %} |
| 109 |
{% set match = query.matched | map(attribute="name") | sort | list %} |
| 110 |
{% set count_match = match | length | int %} |
| 111 |
{% if match | count > 4 %} |
| 112 |
{{ match[:3] | join(", ") }} et {{ (match | length - 3) }} autres |
| 113 |
{% elif match | count == 1 %} |
| 114 |
{% for name in match %} |
| 115 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 116 |
{{ name }} |
| 117 |
{% endfor %} |
| 118 |
est {{ state.state_with_unit }} |
| 119 |
{% else %} |
| 120 |
{% for name in match %} |
| 121 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 122 |
{{ name }} |
| 123 |
{% endfor %} |
| 124 |
sont {{ state.state_with_unit }}s |
| 125 |
{% endif %} |
| 126 |
{% endif %} |
| 127 |
|
| 128 |
which_person: | |
| 129 |
{% if not query.matched %} |
| 130 |
Personne |
| 131 |
{% else: %} |
| 132 |
{% set match = query.matched | map(attribute="name") | sort | list %} |
| 133 |
{% set count_match = match | length | int %} |
| 134 |
{% if match | count > 4 %} |
| 135 |
{{ match[:3] | join(", ") }} et {{ (match | length - 3) }} autres |
| 136 |
{% elif match | count == 1 %} |
| 137 |
{% for name in match %} |
| 138 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 139 |
{{ name }} |
| 140 |
{% endfor %} |
| 141 |
{% else %} |
| 142 |
{% for name in match %} |
| 143 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} et {% endif -%} |
| 144 |
{{ name }} |
| 145 |
{% endfor %} |
| 146 |
{% endif %} |
| 147 |
{% endif %} |
| 148 |
|
| 149 |
how_many: | |
| 150 |
{{ query.matched | length }} |
| 151 |
|
| 152 |
where: | |
| 153 |
{% if state == "not_home" %} |
| 154 |
{{ slots.name | capitalize }} est absent(e) |
| 155 |
{% else %} |
| 156 |
{{ slots.name | capitalize }} est dans la zone {{ state.state }} |
| 157 |
{% endif %} |
| 158 |
|
| 159 |
|
| 160 |
all_windows: | |
| 161 |
{% if not query.unmatched: %} |
| 162 |
Oui |
| 163 |
{% else %} |
| 164 |
{% set count_no_match = query.unmatched | length | int %} |
| 165 |
{% if count_no_match == 1 %} |
| 166 |
Non, une fenêtre n'est pas {{ slots.state }} |
| 167 |
{%- else -%} |
| 168 |
Non, {{count_no_match}} fenêtres ne sont pas {{ slots.state }} |
| 169 |
{% endif %} |
| 170 |
{% endif %} |
| 171 |
|
| 172 |
any_windows: | |
| 173 |
{% if query.matched %} |
| 174 |
{% set count_match = query.matched | length | int %} |
| 175 |
{% if count_match == 1 %} |
| 176 |
Oui, une fenêtre est {{ slots.state }} |
| 177 |
{%- else -%} |
| 178 |
Oui, {{count_match}} fenêtres sont {{ slots.state }} |
| 179 |
{% endif %} |
| 180 |
{% else %} |
| 181 |
Non |
| 182 |
{% endif %} |
| 183 |
|
| 184 |
all_doors: | |
| 185 |
{% if not query.unmatched: %} |
| 186 |
Oui |
| 187 |
{% else %} |
| 188 |
{% set count_no_match = query.unmatched | length | int %} |
| 189 |
{% if count_no_match == 1 %} |
| 190 |
Non, une porte n'est pas {{ slots.state }} |
| 191 |
{%- else -%} |
| 192 |
Non, {{count_no_match}} portes ne sont pas {{ slots.state }} |
| 193 |
{% endif %} |
| 194 |
{% endif %} |
| 195 |
|
| 196 |
any_doors: | |
| 197 |
{% if query.matched %} |
| 198 |
{% set count_match = query.matched | length | int %} |
| 199 |
{% if count_match == 1 %} |
| 200 |
Oui, une porte est {{ slots.state }} |
| 201 |
{%- else -%} |
| 202 |
Oui, {{count_match}} portes sont {{ slots.state }} |
| 203 |
{% endif %} |
| 204 |
{% else %} |
| 205 |
Non |
| 206 |
{% endif %} |
| 207 |
|
| 208 |
all_garage_doors: | |
| 209 |
{% if not query.unmatched: %} |
| 210 |
Oui |
| 211 |
{% else %} |
| 212 |
{% set count_no_match = query.unmatched | length | int %} |
| 213 |
{% if count_no_match == 1 %} |
| 214 |
Non, une porte de garage n'est pas {{ slots.state }} |
| 215 |
{%- else -%} |
| 216 |
Non, {{count_no_match}} portes de garage ne sont pas {{ slots.state }} |
| 217 |
{% endif %} |
| 218 |
{% endif %} |
| 219 |
|
| 220 |
any_garage_doors: | |
| 221 |
{% if query.matched %} |
| 222 |
{% set count_match = query.matched | length | int %} |
| 223 |
{% if count_match == 1 %} |
| 224 |
Oui, une porte de garage est {{ slots.state }} |
| 225 |
{%- else -%} |
| 226 |
Oui, {{count_match}} portes de garage sont {{ slots.state }} |
| 227 |
{% endif %} |
| 228 |
{% else %} |
| 229 |
Non |
| 230 |
{% endif %} |