language: ru 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: | {% if state.state_with_unit == 'open': %} Открыто {% elif state.state_with_unit == 'closed': %} Закрыто {% elif state.state_with_unit == 'on': %} Включено {% elif state.state_with_unit == 'off': %} Выключено {% else %} {{ slots.name | capitalize }} {{ state.state_with_unit }} {% endif %} 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 }} sensor_value: | Текущее значение: {{ state.state_with_unit | replace('.', ',') }} sensor_value_temperature: | Температура {{ state.state_with_unit | replace('.', ',') }}