From 8907700a8a3d6e12ed551b1064f04d67477783aa Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 27 Nov 2025 13:15:42 +0100 Subject: [PATCH] Add co2_concentration to the JSON payload --- src/wlan.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wlan.cpp b/src/wlan.cpp index a7703fe..9bb6a8e 100644 --- a/src/wlan.cpp +++ b/src/wlan.cpp @@ -38,8 +38,9 @@ void disconnect_mqtt(PubSubClient &client, const char *topic) { size_t construct_json(float *data, char *buffer, int buffer_size) { JsonDocument json; - json["temperature"] = data[0]; - json["humidity"] = data[1]; + json["co2_concentration"] = data[0]; + json["temperature"] = data[1]; + json["humidity"] = data[2]; size_t payload_size = serializeJson(json, buffer, buffer_size); return payload_size; }