language: nl responses: intents: HassGetState: one: | {{ slots.name | capitalize }} is {{ state.state_with_unit }} one_yesno: | {% if query.matched %} Ja {% else %} Nee, die is {{ state.state_with_unit }} {% endif %} one_zone: | {% if query.matched %} Ja {% elif state.state == 'not_home' %} Nee, die is niet thuis {% else %} Nee, die is in de zone {{ state.state_with_unit }} {% endif %} bs_yesno: | {% if query.matched %} Ja {% else %} Nee {% endif %} any: | {% if query.matched %} {% set match = query.matched | map(attribute="name") | sort | list %} {% if match | length > 4 %} Ja, {{ match[:3] | join(", ") }} en nog {{ (match | length - 3) }} {%- else -%} Ja, {% for name in match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} en {% endif -%} {{ name }} {%- endfor -%} {% endif %} {% else %} Nee {% endif %} all: | {% if not query.unmatched: %} Ja {% else %} {% set no_match = query.unmatched | map(attribute="name") | sort | list %} {% if no_match | length > 4 %} Nee, {{ no_match[:3] | join(", ") }} en nog {{ (no_match | length - 3) }} niet {%- else -%} Nee, {% for name in no_match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} en {% endif -%} {{ name }} {%- endfor %} niet {% endif %} {% endif %} which: | {% if not query.matched %} Geen {% else %} {% set match = query.matched | map(attribute="name") | sort | list %} {% if match | length > 4 %} {{ match[:3] | join(", ") }} en nog {{ (match | length - 3) }} {% else %} {%- for name in match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} en {% endif -%} {{ name }} {%- endfor -%} {% endif %} {% endif %} how_many: | {{ query.matched | length }} where: | {% if state.state == "not_home" %} {{ slots.name | capitalize }} is niet thuis {% elif state.state == "home" %} {{ slots.name | capitalize }} is thuis {% else %} {{ slots.name | capitalize }} is in zone {{ state.state }} {% endif %}