language: el responses: intents: HassGetState: # the number of names returned is limited to 4, in case there are more, the first 3 names and the remaining count is returned # with 4 names or less, the names are joined with a comma ", " and the last name is joined with " and " one: | {{ slots.name | capitalize }} έχει κατάσταση {{ state.state_with_unit }} one_yesno: | {% if query.matched %} Ναι {% else %} Όχι, {{ state.state_with_unit }} {% endif %} any: | {% if query.matched %} {% set match = query.matched | map(attribute="name") | sort | list %} {% if match | length > 4 %} Ναι, {{ match[:3] | join(", ") }} και {{ (match | length - 3) }} ακόμα {%- else -%} Ναι, {% for name in match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} και {% endif -%} {{ name }} {%- endfor -%} {% endif %} {% else %} Όχι {% endif %} all: | {% if not query.unmatched: %} Ναι {% else %} {% set no_match = query.unmatched | map(attribute="name") | sort | list %} {% if no_match | length > 4 %} Όχι, δεν ισχύει για {{ no_match[:3] | join(", ") }} και {{ (no_match | length - 3) }} ακόμα {%- else -%} Όχι, δεν ισχύει για {% for name in no_match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} και {% endif -%} {{ name }} {%- endfor %} {% endif %} {% endif %} which: | {% if not query.matched %} Κανένα αποτέλεσμα {% else: %} {% set match = query.matched | map(attribute="name") | sort | list %} {% if match | length > 4 %} {{ match[:3] | join(", ") }} και {{ (match | length - 3) }} ακόμα {% else %} {%- for name in match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} και {% endif -%} {{ name }} {%- endfor -%} {% endif %} {% endif %} how_many: | {{ query.matched | length }} where: | {% if state == "not_home" %} {{ slots.name | capitalize }} είναι εκτός σπιτιού {% else %} {{ slots.name | capitalize }} είναι στο {{ state.state }} {% endif %}