summaryrefslogtreecommitdiff
path: root/localwebsite/templates-web
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-11-21 03:51:37 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-11-21 03:51:37 +0300
commit35eec7f8126801a02008d405624927099ca53e5e (patch)
tree6bf89eaeb7674866b9f9918d4e22511d68481bd1 /localwebsite/templates-web
parent80bca2085f1cc177ea5060b6f1f23cab19e9f410 (diff)
lws: fix for malfunctioning si7021 sensor
Diffstat (limited to 'localwebsite/templates-web')
-rw-r--r--localwebsite/templates-web/sensors.twig8
1 files changed, 6 insertions, 2 deletions
diff --git a/localwebsite/templates-web/sensors.twig b/localwebsite/templates-web/sensors.twig
index 14f8454..1005dc0 100644
--- a/localwebsite/templates-web/sensors.twig
+++ b/localwebsite/templates-web/sensors.twig
@@ -6,6 +6,10 @@
{% for key, sensor in sensors %}
<h6 class="text-primary{% if not loop.first %} mt-4{% endif %}">{{ sensor.name }}</h6>
- <span class="text-secondary">Температура:</span> <b>{{ sensor.temp }}</b> °C<br>
- <span class="text-secondary">Влажность:</span> <b>{{ sensor.humidity }}</b>%
+ {% if sensor.hasTemperature() %}
+ <span class="text-secondary">Температура:</span> <b>{{ sensor.temp }}</b> °C<br>
+ {% endif %}
+ {% if sensor.hasHumidity() %}
+ <span class="text-secondary">Влажность:</span> <b>{{ sensor.humidity }}</b>%
+ {% endif %}
{% endfor %}