summaryrefslogtreecommitdiff
path: root/localwebsite/templates-web
diff options
context:
space:
mode:
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 %}