mirror of
https://github.com/OMGeeky/homecontrol.esp-sensors.git
synced 2025-12-26 17:02:29 +01:00
update MQTT data payload to include uptime instead of timestamp
This commit is contained in:
@@ -130,7 +130,7 @@ def publish_sensor_data(
|
||||
data = {
|
||||
"temperature": temperature,
|
||||
"humidity": humidity,
|
||||
"timestamp": time.time(),
|
||||
"uptime": time.time(),
|
||||
"unit": sensor.unit,
|
||||
}
|
||||
client.publish(data_topic, json.dumps(data).encode())
|
||||
|
||||
Reference in New Issue
Block a user