RoyOltmans / aqualin-mqtt-deamon

Lightweight aqualin BLE mqtt deamon controller
9 stars 4 forks source link

Battery level published in wrong format #7

Open georgeavd opened 3 years ago

georgeavd commented 3 years ago

The battery level (percentage) is published in hexadecimal format.

To get this value published in decimal format change the client.publish ... line in def runbatterycheck(): to

client.publish(mqttbasepath + str(devicemac) + '/battery', int(strbatstatus,16))