{% extends 'application/index.html' %} {% load application_extras %} {% block title %} Dashboard {% endblock title %} {% block content %}

{% include 'application/includes/django_messages.html' %} {% for s in sensors %}

Name: {{ s.name }}

Location: {{ s.location }}

{% with records|get_item:s.topic as values %}

{{ s.sensor_type.name }}: {% if values != NoneType %} {{ values|last }} {{ s.sensor_type.units }} {% else %} No data {% endif %}

{% endwith %}

Details:

  • Sensor type: {{ s.model.name }}
  • MQTT topic: {{ s.topic }}
  • Average value: {{ averages|get_item:s.topic }}
  • Min value: {{ minimums|get_item:s.topic }}
  • Max value: {{ maxima|get_item:s.topic }}
{% autoescape off %} {% with figures|get_item:s.topic as graph %} {% if graph != NoneType %} {{ graph }} {% else %} No data available to render graph. {% endif %} {% endwith %} {% endautoescape %}
{% empty %}

You have no sensors yet.

{% endfor %}
{% endblock content %}