Skip to content

Commit dac2098

Browse files
committed
Using i18n for TVOC/NOx raw values as well
1 parent 3fe3aed commit dac2098

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tasmota/tasmota_xsns_sensor/xsns_109_sgp4x.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ void Sgp4xUpdate(void)
207207

208208
#ifdef USE_WEBSERVER
209209
const char HTTP_SNS_SGP4X[] PROGMEM =
210-
"{s}SGP4X TVOC " D_JSON_RAW "{m}%d " "{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
211-
"{s}SGP4X NOX " D_JSON_RAW "{m}%d " "{e}"
210+
"{s}SGP4X " D_TVOC "_" D_JSON_RAW "{m}%d " "{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
211+
"{s}SGP4X " D_NOX "_" D_JSON_RAW "{m}%d " "{e}"
212212
"{s}SGP4X " D_TVOC "{m}%d " "{e}"
213213
"{s}SGP4X " D_NOX "{m}%d " "{e}";
214214
#endif
@@ -217,7 +217,7 @@ void Sgp4xShow(bool json)
217217
{
218218
if (sgp4x_state == STATE_SGP4X_NORMAL) {
219219
if (json) {
220-
ResponseAppend_P(PSTR(",\"SGP4X\":{\"VOC_" D_JSON_RAW "\":%d,\"NOX_" D_JSON_RAW "\":%d,\"" D_TVOC "\":%d,\"" D_NOX "\":%d"), srawVoc, srawNox, voc_index_sgp4x, nox_index_sgp4x);
220+
ResponseAppend_P(PSTR(",\"SGP4X\":{\"" D_TVOC "_" D_JSON_RAW "\":%d,\"" D_NOX "_" D_JSON_RAW "\":%d,\"" D_TVOC "\":%d,\"" D_NOX "\":%d"), srawVoc, srawNox, voc_index_sgp4x, nox_index_sgp4x);
221221
ResponseJsonEnd();
222222
#ifdef USE_DOMOTICZ
223223
if (0 == TasmotaGlobal.tele_period) DomoticzSensor(DZ_AIRQUALITY, srawVoc);

0 commit comments

Comments
 (0)