Format air temperature and time values in template.
[chrisu/seepark.git] / web / templates / seepark_web.html
index fd75b467b877d5f5904620bf62cda83024a6b21c..2fccfd6ba030e78be45265bbf5e82cdf4886ef4b 100644 (file)
                <h2>Aktuelle Werte</h2>
                <div id="current">
                <p id="currentair">
-                       <strong>Luft: {{ airvalue }}°C</strong><br />
-                       <small>({{ airtime }})</small>
+                       {% if airvalue is none %}
+                       <strong>Luft: N/A</strong>
+                       {% else %}
+                       <strong>Luft: {{ airvalue|round(1) }}°C</strong><br />
+                       <small>({{ airtime.strftime('%Y-%m-%d %H:%M') }})</small>
+                       {% endif %}
                </p>
                <p id="currentwater">
                        <strong>Wasser: {{ watervalue }}°C</strong><br />