{% if entities %} {% for entity_id, state in entities %} {{ entity_id }} {% set s = state.get("state", "unknown") if state is mapping else state %} {% if s == "on" %} {{ s }} {% elif s == "off" %} {{ s }} {% elif s == "unavailable" %} {{ s }} {% else %} {{ s }} {% endif %} {% if state is mapping and state.get("last_changed") %} {{ state.last_changed }} {% else %} — {% endif %} {% if state is mapping and state.get("attributes") %} {% set attrs_json = state.attributes | tojson %}
{{ attrs_json | truncate(80) }}
{{ state.attributes | tojson(indent=2) }}
{% else %} — {% endif %} {% endfor %} {% if total > limit + offset %} {% endif %} {% else %} No entities found. {% endif %}