diff --git a/battery2mqtt.py b/battery2mqtt.py index 3e14856..a774fff 100644 --- a/battery2mqtt.py +++ b/battery2mqtt.py @@ -81,8 +81,7 @@ while True: try: client.connect(MQTT_HOST) client.publish("battery2mqtt/" + MQTT_TOPIC + '/' + dir, json.dumps(payload), qos=MQTT_QOS, retain=False) - last_payload = payload except: print('Message send failed.') - sleep(INTERVAL) \ No newline at end of file + sleep(INTERVAL)