Fix SGP4 domoticz air quality (#18880)

This commit is contained in:
Theo Arends 2024-04-11 15:35:00 +02:00
parent 1b5fdb5c57
commit e98ce29fea
2 changed files with 6 additions and 2 deletions

View File

@ -271,7 +271,9 @@ void Sgp4xShow(bool json)
}
ResponseJsonEnd();
#ifdef USE_DOMOTICZ
if (0 == TasmotaGlobal.tele_period) DomoticzSensor(DZ_AIRQUALITY, srawVoc);
if (0 == TasmotaGlobal.tele_period) {
DomoticzSensor(DZ_AIRQUALITY, voc_index_sgp4x);
}
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {

View File

@ -120,7 +120,9 @@ void Sgp40Show(bool json)
}
ResponseJsonEnd();
#ifdef USE_DOMOTICZ
if (0 == TasmotaGlobal.tele_period) DomoticzSensor(DZ_AIRQUALITY, raw_base);
if (0 == TasmotaGlobal.tele_period) {
DomoticzSensor(DZ_AIRQUALITY, voc_index);
}
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {