Add sign to battery and voltage

feature/plugin_nodes_nonetype_repair
mate-dev 2023-12-06 19:01:09 +00:00
rodzic 5af42c8fe4
commit 65d14ce4f9
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -54,8 +54,8 @@ $shortname $longname / $devicemodel / $battery $voltage / $snr / $lastseen
if "lastHeard" in info and info["lastHeard"] is not None:
last_heard = get_relative_time(info["lastHeard"])
voltage = ""
battery = ""
voltage = "?V"
battery = "?%"
if "deviceMetrics" in info:
if "voltage" in info["deviceMetrics"] and info["deviceMetrics"]["voltage"] is not None:
voltage = f"{info['deviceMetrics']['voltage']}V "