language: ro responses: intents: HassGetState: default: "{{ state.state_with_unit }}" # used mostly for custom sentences # 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 }} este {{ state.state_with_unit }}" one_yesno: | {% if query.matched: %} Da {% else: %} Nu, ci {{ state.state_with_unit }} {% endif %} any: | {% if query.matched %} {% set match = query.matched | map(attribute="name") | sort | list %} {% if match | length > 4 %} Da, {{ match[:3] | join(", ") }} și încă {{ (match | length - 3) }} {%- else -%} Da, {% for name in match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} și {% endif -%} {{ name }} {%- endfor -%} {% endif %} {% else %} Nu {% endif %} all: | {% if not query.unmatched: %} Da {% else %} {% set no_match = query.unmatched | map(attribute="name") | sort | list %} {% if no_match | length > 4 %} Nu, {{ no_match[:3] | join(", ") }} și încă {{ (no_match | length - 3) }} nu sunt {{ slots.state }} {%- else -%} Nu, {% for name in no_match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} și {% endif -%} {{ name }} {%- endfor %} nu{{ '' if (query.unmatched|length) == 1 else ' sunt' }} {% endif %} {% endif %} which: | {% if not query.matched %} Nu există niciun astfel de element {% else: %} {% set match = query.matched | map(attribute="name") | sort | list %} {% if match | length > 4 %} {{ match[:3] | join(", ") }} și încă {{ (match | length - 3) }} {% else %} {%- for name in match -%} {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} și {% endif -%} {{ name }} {%- endfor -%} {% endif %} {% endif %} how_many: | {{ query.matched | length }} where: | {% if state.state == "not_home" %} {{ slots.name | capitalize }} nu este acasă {% elif state.state == "home" %} {{ slots.name | capitalize }} este acasă {% else %} {{ slots.name | capitalize }} este la {{ state.state }} {% endif %}