|
|
@@ -391,7 +391,7 @@ while True:
|
|
|
elif reporting_mode == 'mqtt-homie':
|
|
|
print_line('Publishing data to MQTT base topic "{}/{}/{}"'.format(base_topic, device_id, flora_name))
|
|
|
for [param, value] in data.items():
|
|
|
- mqtt_client.publish('{}/{}/{}/{}'.format(base_topic, device_id, flora_name, param), value, 1, False)
|
|
|
+ mqtt_client.publish('{}/{}/{}/{}'.format(base_topic, device_id, flora_name, param), value, 1, True)
|
|
|
sleep(0.5) # some slack for the publish roundtrip and callback function
|
|
|
elif reporting_mode == 'mqtt-smarthome':
|
|
|
for [param, value] in data.items():
|