diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-11-21 03:51:37 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-11-21 03:51:37 +0300 |
commit | 35eec7f8126801a02008d405624927099ca53e5e (patch) | |
tree | 6bf89eaeb7674866b9f9918d4e22511d68481bd1 /localwebsite/templates-web | |
parent | 80bca2085f1cc177ea5060b6f1f23cab19e9f410 (diff) |
lws: fix for malfunctioning si7021 sensor
Diffstat (limited to 'localwebsite/templates-web')
-rw-r--r-- | localwebsite/templates-web/sensors.twig | 8 |
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 %} |