mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Fix for SGP30 for Abs Humidity on Web UI
This commit is contained in:
parent
615645e50e
commit
11cb3e838c
@ -118,12 +118,14 @@ void Sgp30Show(bool json)
|
|||||||
{
|
{
|
||||||
if (sgp30_ready) {
|
if (sgp30_ready) {
|
||||||
char abs_hum[33];
|
char abs_hum[33];
|
||||||
|
|
||||||
|
if (global_update && global_humidity>0 && global_temperature!=9999) {
|
||||||
|
// has humidity + temperature
|
||||||
|
dtostrfd(sgp30_abshum,4,abs_hum);
|
||||||
|
}
|
||||||
if (json) {
|
if (json) {
|
||||||
ResponseAppend_P(PSTR(",\"SGP30\":{\"" D_JSON_ECO2 "\":%d,\"" D_JSON_TVOC "\":%d"), sgp.eCO2, sgp.TVOC);
|
ResponseAppend_P(PSTR(",\"SGP30\":{\"" D_JSON_ECO2 "\":%d,\"" D_JSON_TVOC "\":%d"), sgp.eCO2, sgp.TVOC);
|
||||||
if (global_update && global_humidity>0 && global_temperature!=9999) {
|
if (global_update && global_humidity>0 && global_temperature!=9999) {
|
||||||
// has humidity + temperature
|
|
||||||
dtostrfd(sgp30_abshum,4,abs_hum);
|
|
||||||
ResponseAppend_P(PSTR(",\"" D_JSON_AHUM "\":%s"),abs_hum);
|
ResponseAppend_P(PSTR(",\"" D_JSON_AHUM "\":%s"),abs_hum);
|
||||||
}
|
}
|
||||||
ResponseJsonEnd();
|
ResponseJsonEnd();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user