{% if events %}
  <div class="content">
    <ul class="ht-event-list">
      {% for event in events | reverse %}
        <li class="is-size-7">
          <span class="tag is-small {% if event.type == 'state_changed' %}is-info is-light {% elif event.type == 'app_status_changed' %}is-warning is-light {% elif event.type == 'connectivity' %}is-link is-light {% else %}is-light{% endif %}">
            {{ event.type }}
          </span>
          {% if event.get("entity_id") %}<code>{{ event.entity_id }}</code>{% endif %}
        </li>
      {% endfor %}
    </ul>
  </div>
{% else %}
  <p class="has-text-grey is-size-7">No recent events.</p>
{% endif %}
