Commit d2050bc3 authored by Kristian Tan's avatar Kristian Tan

Change message display logic

parent 81875702
...@@ -32,16 +32,17 @@ ...@@ -32,16 +32,17 @@
<div class="smart_meter"> <div class="smart_meter">
<div class="smart_meter_info"> <div class="smart_meter_info">
<p> Devices currently in use: <p> Devices currently in use:
{% msg = "" %}
{% for pin in pins %} {% for pin in pins %}
{% if pins[pin].state == true %} {% if pins[pin].state == true %}
{{ pins[pin].name }} {{% msg = pins[pin].name %}}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if pins|length == 0 %} {% if pins|length == 0 %}
No devices currently in use. {{% msg = No devices currently in use. %}}
{% endif %} {% endif %}
{{ msg }}
</p> </p>
<p> Used today: <p> Used today:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment