| 1 |
language: lb |
| 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 |
{{ slots.name | capitalize }} ass {{ state.state_with_unit }} |
| 9 |
|
| 10 |
one_yesno: | |
| 11 |
{% if query.matched %} |
| 12 |
Jo |
| 13 |
{% else %} |
| 14 |
Nee, ass {{ state.state_with_unit }} |
| 15 |
{% endif %} |
| 16 |
|
| 17 |
any: | |
| 18 |
{% if query.matched %} |
| 19 |
{% set match = query.matched | map(attribute="name") | sort | list %} |
| 20 |
{% if match | length > 4 %} |
| 21 |
Jo, {{ match[:3] | join(", ") }} an {{ (match | length - 3) }} méi |
| 22 |
{%- else -%} |
| 23 |
Jo, |
| 24 |
{% for name in match -%} |
| 25 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} an {% endif -%} |
| 26 |
{{ name }} |
| 27 |
{%- endfor -%} |
| 28 |
{% endif %} |
| 29 |
{% else %} |
| 30 |
Nee |
| 31 |
{% endif %} |
| 32 |
|
| 33 |
all: | |
| 34 |
{% if not query.unmatched: %} |
| 35 |
Jo |
| 36 |
{% else %} |
| 37 |
{% set no_match = query.unmatched | map(attribute="name") | sort | list %} |
| 38 |
{% if no_match | length > 4 %} |
| 39 |
Nee, {{ no_match[:3] | join(", ") }} an {{ (no_match | length - 3) }} méi si net |
| 40 |
{%- else -%} |
| 41 |
Nee, |
| 42 |
{% for name in no_match -%} |
| 43 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} an {% endif -%} |
| 44 |
{{ name }} |
| 45 |
{%- endfor %} net |
| 46 |
{% endif %} |
| 47 |
{% endif %} |
| 48 |
|
| 49 |
which: | |
| 50 |
{% if not query.matched %} |
| 51 |
Kee vu |
| 52 |
{% else: %} |
| 53 |
{% set match = query.matched | map(attribute="name") | sort | list %} |
| 54 |
{% if match | length > 4 %} |
| 55 |
{{ match[:3] | join(", ") }} an {{ (match | length - 3) }} méi |
| 56 |
{% else %} |
| 57 |
{%- for name in match -%} |
| 58 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} an {% endif -%} |
| 59 |
{{ name }} |
| 60 |
{%- endfor -%} |
| 61 |
{% endif %} |
| 62 |
{% endif %} |
| 63 |
|
| 64 |
how_many: | |
| 65 |
{{ query.matched | length }} |