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; }