kopia lustrzana https://github.com/mate-dev/meshtastic-matrix-relay
try line break in diffrent place
rodzic
90956498ab
commit
4b7802405d
|
@ -47,7 +47,7 @@ $shortname $longname / $devicemodel / $battery $voltage / $snr / $lastseen
|
||||||
|
|
||||||
meshtastic_client = connect_meshtastic()
|
meshtastic_client = connect_meshtastic()
|
||||||
|
|
||||||
response = f">**Nodes: {len(meshtastic_client.nodes)}**"
|
response = f">**Nodes: {len(meshtastic_client.nodes)}**\n \n"
|
||||||
|
|
||||||
for node, info in meshtastic_client.nodes.items():
|
for node, info in meshtastic_client.nodes.items():
|
||||||
snr = ""
|
snr = ""
|
||||||
|
@ -67,9 +67,9 @@ $shortname $longname / $devicemodel / $battery $voltage / $snr / $lastseen
|
||||||
if "batteryLevel" in info["deviceMetrics"]:
|
if "batteryLevel" in info["deviceMetrics"]:
|
||||||
battery = f"{info['deviceMetrics']['batteryLevel']}% "
|
battery = f"{info['deviceMetrics']['batteryLevel']}% "
|
||||||
|
|
||||||
response += f"\n\n>**{info['user']['shortName']}** {info['user']['longName']}\n"\
|
response += f">**{info['user']['shortName']}** {info['user']['longName']}\n"\
|
||||||
f">{info['user']['hwModel']} {battery}{voltage}\n"\
|
f">{info['user']['hwModel']} {battery}{voltage}\n"\
|
||||||
f">{snr}{last_heard}"
|
f">{snr}{last_heard}\n \n"
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue