Update Xiaomi_Scale.py
This commit is contained in:
parent
a8d1d1573c
commit
6b8ccc2412
@ -292,7 +292,7 @@ class ScanProcessor():
|
|||||||
message += ',"身体类型":"' + str(bodyscale[lib.getBodyType()]) + '"'
|
message += ',"身体类型":"' + str(bodyscale[lib.getBodyType()]) + '"'
|
||||||
message += ',"代谢年龄":' + "{:.0f}".format(lib.getMetabolicAge())
|
message += ',"代谢年龄":' + "{:.0f}".format(lib.getMetabolicAge())
|
||||||
|
|
||||||
message += ',"timestamp":"' + mitdatetime + '"'
|
message += ',"测量时间":"' + mitdatetime + '"'
|
||||||
message += '}'
|
message += '}'
|
||||||
try:
|
try:
|
||||||
sys.stdout.write(f"{datetime.now().strftime('%Y-%m-%d %H:%M:%S')} - Publishing data to topic {MQTT_PREFIX + '/' + user + '/weight'}: {message}\n")
|
sys.stdout.write(f"{datetime.now().strftime('%Y-%m-%d %H:%M:%S')} - Publishing data to topic {MQTT_PREFIX + '/' + user + '/weight'}: {message}\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user