blob: 86451df80819a610e60d09c251decf40bb539ac2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{% extends "layout.html" %}
{% block body %}
<aside>
<b>{% if devId == 1 %}Bedroom
{% else %}Mainfloor
{% endif %}Currently:</b>
<ul class=current>
<li>{{ current.temperature }}°F</li>
<li>{{ current.humidity }}% humidity</li>
</ul>
</aside>
<figure>
<embed type="image/png" src="/htgraph.png?deviceId={{ devId }}" />
</figure>
<figure>
<embed type="image/png" src="/pgraph.png?deviceId={{ devId }}" />
</figure>
{% if devId == 2 %}
<figure>
<embed type="image/png" src="/bgraph.png?deviceId={{ devId }}" />
</figure>
{% endif %}
<hr>
<h2>Readings from the past 24 hours</h2>
<p>
<table class=log>
<tr>
<th>Timestamp</th>
<th>Temperature (C)</th>
<th>Humidity (%)</th>
<th>Pressure (hPa)</th>
</tr>
{% for entry in log %}
<tr>
<td>{{ entry.date }}</td>
<td>{{ entry.temperature }}</td>
<td>{{ entry.humidity }}</td>
<td>{{ entry.pressure }}</td>
</tr>
{% endfor %}
</table>
</p>
{% endblock %}
|