From 2f6ab10146f7ce50a2877e8d671a64f74b20ec46 Mon Sep 17 00:00:00 2001 From: Andrew Klaus Date: Tue, 9 Jan 2024 01:09:36 -0700 Subject: [PATCH] Fixing logic for SGP4x Sgp4xShow() function (#20439) --- tasmota/tasmota_xsns_sensor/xsns_109_sgp4x.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xsns_sensor/xsns_109_sgp4x.ino b/tasmota/tasmota_xsns_sensor/xsns_109_sgp4x.ino index b58898b50..702e7423a 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_109_sgp4x.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_109_sgp4x.ino @@ -265,9 +265,9 @@ void Sgp4xShow(bool json) if (sgp4x_state == STATE_SGP4X_NORMAL) { if (json) { if (sgp4x_type == TYPE_SGP41) { - ResponseAppend_P(PSTR(",\"SGP40\":{\"VOC_" D_JSON_RAW "\":%d,\"NOX_" D_JSON_RAW "\":%d,\"" D_TVOC "\":%d,\"" D_NOX "\":%d"), srawVoc, srawNox, voc_index_sgp4x, nox_index_sgp4x); + ResponseAppend_P(PSTR(",\"SGP41\":{\"VOC_" D_JSON_RAW "\":%d,\"NOX_" D_JSON_RAW "\":%d,\"" D_TVOC "\":%d,\"" D_NOX "\":%d"), srawVoc, srawNox, voc_index_sgp4x, nox_index_sgp4x); } else { - ResponseAppend_P(PSTR(",\"SGP41\":{\"VOC_" D_JSON_RAW "\":%d,,\"" D_TVOC "\":%d,"), srawVoc, voc_index_sgp4x); + ResponseAppend_P(PSTR(",\"SGP40\":{\"VOC_" D_JSON_RAW "\":%d,,\"" D_TVOC "\":%d,"), srawVoc, voc_index_sgp4x); } ResponseJsonEnd(); #ifdef USE_DOMOTICZ