| 1 | language: nl |
| 2 | responses: |
| 3 | intents: |
| 4 | HassGetState: |
| 5 | one: | |
| 6 | {{ slots.name | capitalize }} is {{ state.state_with_unit }} |
| 7 | |
| 8 | one_yesno: | |
| 9 | {% if query.matched %} |
| 10 | Ja |
| 11 | {% else %} |
| 12 | Nee, die is {{ state.state_with_unit }} |
| 13 | {% endif %} |
| 14 | |
| 15 | one_zone: | |
| 16 | {% if query.matched %} |
| 17 | Ja |
| 18 | {% elif state.state == 'not_home' %} |
| 19 | Nee, die is niet thuis |
| 20 | {% else %} |
| 21 | Nee, die is in de zone {{ state.state_with_unit }} |
| 22 | {% endif %} |
| 23 | |
| 24 | bs_yesno: | |
| 25 | {% if query.matched %} |
| 26 | Ja |
| 27 | {% else %} |
| 28 | Nee |
| 29 | {% endif %} |
| 30 | |
| 31 | any: | |
| 32 | {% if query.matched %} |
| 33 | {% set match = query.matched | map(attribute="name") | sort | list %} |
| 34 | {% if match | length > 4 %} |
| 35 | Ja, {{ match[:3] | join(", ") }} en nog {{ (match | length - 3) }} |
| 36 | {%- else -%} |
| 37 | Ja, |
| 38 | {% for name in match -%} |
| 39 | {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} en {% endif -%} |
| 40 | {{ name }} |
| 41 | {%- endfor -%} |
| 42 | {% endif %} |
| 43 | {% else %} |
| 44 | Nee |
| 45 | {% endif %} |
| 46 | |
| 47 | all: | |
| 48 | {% if not query.unmatched: %} |
| 49 | Ja |
| 50 | {% else %} |
| 51 | {% set no_match = query.unmatched | map(attribute="name") | sort | list %} |
| 52 | {% if no_match | length > 4 %} |
| 53 | Nee, {{ no_match[:3] | join(", ") }} en nog {{ (no_match | length - 3) }} niet |
| 54 | {%- else -%} |
| 55 | Nee, |
| 56 | {% for name in no_match -%} |
| 57 | {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} en {% endif -%} |
| 58 | {{ name }} |
| 59 | {%- endfor %} niet |
| 60 | {% endif %} |
| 61 | {% endif %} |
| 62 | |
| 63 | which: | |
| 64 | {% if not query.matched %} |
| 65 | Geen |
| 66 | {% else %} |
| 67 | {% set match = query.matched | map(attribute="name") | sort | list %} |
| 68 | {% if match | length > 4 %} |
| 69 | {{ match[:3] | join(", ") }} en nog {{ (match | length - 3) }} |
| 70 | {% else %} |
| 71 | {%- for name in match -%} |
| 72 | {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} en {% endif -%} |
| 73 | {{ name }} |
| 74 | {%- endfor -%} |
| 75 | {% endif %} |
| 76 | {% endif %} |
| 77 | |
| 78 | how_many: | |
| 79 | {{ query.matched | length }} |
| 80 | |
| 81 | where: | |
| 82 | {% if state.state == "not_home" %} |
| 83 | {{ slots.name | capitalize }} is niet thuis |
| 84 | {% elif state.state == "home" %} |
| 85 | {{ slots.name | capitalize }} is thuis |
| 86 | {% else %} |
| 87 | {{ slots.name | capitalize }} is in zone {{ state.state }} |
| 88 | {% endif %} |