Open georgeavd opened 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 ...
def runbatterycheck()
client.publish(mqttbasepath + str(devicemac) + '/battery', int(strbatstatus,16))
The battery level (percentage) is published in hexadecimal format.
To get this value published in decimal format change the
client.publish ...
line indef runbatterycheck()
: toclient.publish(mqttbasepath + str(devicemac) + '/battery', int(strbatstatus,16))