language: it responses: intents: HassGetState: one: | {{ slots.name | capitalize }} è {{ state.state_with_unit }} one_yesno: | {% if query.matched %} Sì {% else %} No, è {{ state.state_with_unit }} {% endif %} any: | {% if query.matched %} {% set match = query.matched | map(attribute="name") | sort | list %} {% if match | length == 4 %} Sì, {{ match[:3] | join(", ") }} ed un altro {% elif match | length > 4 %} Sì, {{ match[:3] | join(", ") }} ed altri {{ (match | length - 3) }} {%- else -%} Sì, {% for name in match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} {{ name }} {%- endfor -%} {% endif %} {% else %} No {% endif %} all: | {% if not query.unmatched: %} Sì {% else %} {% set no_match = query.unmatched | map(attribute="name") | sort | list %} {% if no_match | length == 4 %} No, {{ no_match[:3] | join(", ") }} ed un altro no {% elif no_match | length > 4 %} No, {{ no_match[:3] | join(", ") }} ed altri {{ (no_match | length - 3) }} {%- else -%} No, {% for name in no_match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} {{ name }} {%- endfor %} no {% endif %} {% endif %} which: | {% if not query.matched %} Nessuno {% else: %} {% set match = query.matched | map(attribute="name") | sort | list %} {% if match | length == 4 %} {{ match[:3] | join(", ") }} ed un altro {% elif match | length > 4 %} {{ match[:3] | join(", ") }} ed altri {{ (match | length - 3) }} {% else %} {%- for name in match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} {{ name }} {%- endfor -%} {% endif %} {% endif %} how_many: | {{ query.matched | length }} where: | {% if state == "not_home" %} {{ slots.name | capitalize }} è fuori casa {% else %} {{ slots.name | capitalize }} è in {{ state.state }} {% endif %}