Commit d2050bc3 authored by Kristian Tan's avatar Kristian Tan

Change message display logic

parent 81875702
......@@ -32,16 +32,17 @@
<div class="smart_meter">
<div class="smart_meter_info">
<p> Devices currently in use:
{% msg = "" %}
{% for pin in pins %}
{% if pins[pin].state == true %}
{{ pins[pin].name }}
{{% msg = pins[pin].name %}}
{% endif %}
{% endfor %}
{% if pins|length == 0 %}
No devices currently in use.
{{% msg = No devices currently in use. %}}
{% endif %}
{{ msg }}
</p>
<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