Skip to content

Commit

Permalink
same as last just right this time
Browse files Browse the repository at this point in the history
  • Loading branch information
EricAndrechek committed Apr 10, 2024
1 parent 7fa172c commit 8ad5286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tracking-dashboard/backend/mqtt-syncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def on_message(client, userdata, message):
topic = "TELEMETRY/" + message_building[id]['name'] + "-" + str(message_building[id]['ssid'])
for key in src['data']['telemetry']:
# check if last value is the same
if key in old_messages[id]['telemetry'] and src['data']['telemetry'][key] == old_messages[id][key]:
if key in old_messages[id] and src['data']['telemetry'][key] == old_messages[id][key]:
continue
client.publish(topic + "/" + key, json.dumps(src['data']['telemetry'][key]), retain=True, qos=0)
return
Expand Down

0 comments on commit 8ad5286

Please sign in to comment.