{% extends "base.html" %} {% from "_header.html" import nav_btns, settings_btn, title_block, subline, section_tabs %} {% block title %}Stations · Dashboard{% endblock %} {% block head %}{% endblock %} {# The stations page: a card per sensor — now (temperature in its band colour, humidity), lowest / highest in the range, the graph (temperature line, from 7 days on a lowest–highest band, humidity dashed on its own 0–100 % scale, gaps where nothing was measured; hover a strip for the values). views.page / views.chart. #} {% block page %}
{{ nav_btns() }} {{ title_block("Stations", "/stations") }} {{ settings_btn("sensors") }}
{# like the weather page: on wide windows the tab row sits beside the sub-heading #} {{ subline(v.status) }} {% if plugin_host("stations") %}{{ section_tabs(plugin_host("stations"), "/stations") }}{% endif %}{# inside Weather: its tab row #}
{% for c in v.cards %}
{{ c.name }}{{ c.kind }}{% if c.age is not none and c.age > 900 %} · last reading {{ (c.age // 60) | int }} min ago{% endif %}
{{ c.temp or "—" }}{% if c.hum %}{{ c.hum }}{% endif %}
{% if c.lo %}
lowest {{ c.lo }} · highest {{ c.hi }}
{% endif %} {% set g = c.chart %} {% if g %} {% for t in g.yticks %}{{ t.v }}{% endfor %} {% for t in g.xticks %}{{ t.t }}{% endfor %} {% for b in g.band %}{% endfor %} {% for p in g.hum %}{% endfor %} {% for p in g.temp %}{% endfor %} {% for s in g.strips %}{{ s.tip }}{% endfor %}
temperature{% if v.range != "1d" %}lowest – highest{% endif %}humidity
{% else %}

No readings kept for this sensor in this range yet — they're kept from now on.

{% endif %}
{% endfor %}
{% endblock %}