forked from sthope/battery2mqtt
		
	Revert only send message when state change occurs
This commit is contained in:
		@@ -81,7 +81,6 @@ while True:
 | 
				
			|||||||
    try:
 | 
					    try:
 | 
				
			||||||
        client.connect(MQTT_HOST)
 | 
					        client.connect(MQTT_HOST)
 | 
				
			||||||
        client.publish("battery2mqtt/" + MQTT_TOPIC + '/' + dir, json.dumps(payload), qos=MQTT_QOS, retain=False)
 | 
					        client.publish("battery2mqtt/" + MQTT_TOPIC + '/' + dir, json.dumps(payload), qos=MQTT_QOS, retain=False)
 | 
				
			||||||
        last_payload = payload
 | 
					 | 
				
			||||||
    except:
 | 
					    except:
 | 
				
			||||||
        print('Message send failed.')
 | 
					        print('Message send failed.')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user