From 99f2c8e2e0c408ecb9025f1b9597ce677627220a Mon Sep 17 00:00:00 2001 From: Kevin Elliott Date: Thu, 29 Aug 2024 16:24:04 -0700 Subject: [PATCH] Fix: issue with nodes --- templates/static/nodes.html.j2 | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/templates/static/nodes.html.j2 b/templates/static/nodes.html.j2 index 7344971..73c5b13 100644 --- a/templates/static/nodes.html.j2 +++ b/templates/static/nodes.html.j2 @@ -131,22 +131,34 @@ {% if node.telemetry %} {% if 'battery_level' in node.telemetry %} - {{ node.telemetry.battery_level }}% + {{ node.telemetry.battery_level }}% {% endif %} {% if 'voltage' in node.telemetry %} - {{ node.telemetry.voltage|round(2) }}V + {% if node.telemetry.voltage is number %} + {{ node.telemetry.voltage|round(2) }}V + {% else %} + {{ node.telemetry.voltage }} + {% endif %} {% endif %} {% if 'air_util_tx' in node.telemetry %} - {{ node.telemetry.air_util_tx|round(1) }}% + {% if node.telemetry.air_util_tx is number %} + {{ node.telemetry.air_util_tx|round(1) }}% + {% else %} + {{ node.telemetry.air_util_tx }} + {% endif %} {% endif %} {% if 'channel_utilization' in node.telemetry %} - {{ node.telemetry.channel_utilization|round(1) }}% + {% if node.telemetry.channel_utilitization is number %} + {{ node.telemetry.channel_utilization|round(1) }}% + {% else %} + {{ node.telemetry.channel_utilitization }} + {% endif %} {% endif %} {% else %}