From 21aad36072c58b82e26e2b0d232bbe5882554dda Mon Sep 17 00:00:00 2001 From: CezaryPuchowski Date: Sun, 1 Oct 2023 20:38:47 +0200 Subject: [PATCH] try another aproche --- plugins/nodes_plugin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/nodes_plugin.py b/plugins/nodes_plugin.py index ab4de9e..df87d04 100644 --- a/plugins/nodes_plugin.py +++ b/plugins/nodes_plugin.py @@ -47,7 +47,7 @@ $shortname $longname / $devicemodel / $battery $voltage / $snr / $lastseen meshtastic_client = connect_meshtastic() - response = f">**Nodes: {len(meshtastic_client.nodes)}**\n \n" + response = f">**Nodes: {len(meshtastic_client.nodes)}**\n\n" for node, info in meshtastic_client.nodes.items(): snr = "" @@ -67,9 +67,10 @@ $shortname $longname / $devicemodel / $battery $voltage / $snr / $lastseen if "batteryLevel" in info["deviceMetrics"]: battery = f"{info['deviceMetrics']['batteryLevel']}% " - response += f">**{info['user']['shortName']}** {info['user']['longName']}\n"\ - f">{info['user']['hwModel']} {battery}{voltage}\n"\ - f">{snr}{last_heard}\n \n" + response += f">
\n\n"\ + f">**{info['user']['shortName']}** {info['user']['longName']}\n\n"\ + f">{info['user']['hwModel']} {battery}{voltage}\n\n"\ + f">{snr}{last_heard}\n\n" return response