We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 93c9be2 + 40553f1 commit c8eb2c1Copy full SHA for c8eb2c1
examples/mqtt-all.py
@@ -262,7 +262,7 @@ def main():
262
values.update(pms_values)
263
values["serial"] = device_serial_number
264
print(values)
265
- mqtt_client.publish(args.topic, json.dumps(values))
+ mqtt_client.publish(args.topic, json.dumps(values), retain=True)
266
display_status(disp, args.broker)
267
time.sleep(args.interval)
268
except Exception as e:
0 commit comments