| 1 |
language: it |
| 2 |
responses: |
| 3 |
intents: |
| 4 |
HassGetState: |
| 5 |
one: | |
| 6 |
{{ slots.name | capitalize }} è {{ state.state_with_unit }} |
| 7 |
|
| 8 |
one_yesno: | |
| 9 |
{% if query.matched %} |
| 10 |
Sì |
| 11 |
{% else %} |
| 12 |
No, è {{ state.state_with_unit }} |
| 13 |
{% endif %} |
| 14 |
|
| 15 |
any: | |
| 16 |
{% if query.matched %} |
| 17 |
{% set match = query.matched | map(attribute="name") | sort | list %} |
| 18 |
{% if match | length == 4 %} |
| 19 |
Sì, {{ match[:3] | join(", ") }} ed un altro |
| 20 |
{% elif match | length > 4 %} |
| 21 |
Sì, {{ match[:3] | join(", ") }} ed altri {{ (match | length - 3) }} |
| 22 |
{%- else -%} |
| 23 |
Sì, |
| 24 |
{% for name in match -%} |
| 25 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} |
| 26 |
{{ name }} |
| 27 |
{%- endfor -%} |
| 28 |
{% endif %} |
| 29 |
{% else %} |
| 30 |
No |
| 31 |
{% endif %} |
| 32 |
|
| 33 |
all: | |
| 34 |
{% if not query.unmatched: %} |
| 35 |
Sì |
| 36 |
{% else %} |
| 37 |
{% set no_match = query.unmatched | map(attribute="name") | sort | list %} |
| 38 |
{% if no_match | length == 4 %} |
| 39 |
No, {{ no_match[:3] | join(", ") }} ed un altro no |
| 40 |
{% elif no_match | length > 4 %} |
| 41 |
No, {{ no_match[:3] | join(", ") }} ed altri {{ (no_match | length - 3) }} |
| 42 |
{%- else -%} |
| 43 |
No, |
| 44 |
{% for name in no_match -%} |
| 45 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} |
| 46 |
{{ name }} |
| 47 |
{%- endfor %} no |
| 48 |
{% endif %} |
| 49 |
{% endif %} |
| 50 |
|
| 51 |
which: | |
| 52 |
{% if not query.matched %} |
| 53 |
Nessuno |
| 54 |
{% else: %} |
| 55 |
{% set match = query.matched | map(attribute="name") | sort | list %} |
| 56 |
{% if match | length == 4 %} |
| 57 |
{{ match[:3] | join(", ") }} ed un altro |
| 58 |
{% elif match | length > 4 %} |
| 59 |
{{ match[:3] | join(", ") }} ed altri {{ (match | length - 3) }} |
| 60 |
{% else %} |
| 61 |
{%- for name in match -%} |
| 62 |
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} |
| 63 |
{{ name }} |
| 64 |
{%- endfor -%} |
| 65 |
{% endif %} |
| 66 |
{% endif %} |
| 67 |
|
| 68 |
how_many: | |
| 69 |
{{ query.matched | length }} |
| 70 |
|
| 71 |
where: | |
| 72 |
{% if state == "not_home" %} |
| 73 |
{{ slots.name | capitalize }} è fuori casa |
| 74 |
{% else %} |
| 75 |
{{ slots.name | capitalize }} è in {{ state.state }} |
| 76 |
{% endif %} |