mirror of https://github.com/arendst/Tasmota.git
Add CO2 autolight
Add CO2 autolight to CO sensors SCD30, SCD40 and EZOCO2
This commit is contained in:
parent
38d2c444e8
commit
04e0aaf126
|
@ -98,6 +98,9 @@ void Scd30Update(void) {
|
|||
Scd30.loop_count = 0;
|
||||
Scd30.data_valid = true;
|
||||
Scd30.good_measure_count++;
|
||||
#ifdef USE_LIGHT
|
||||
LightSetSignal(CO2_LOW, CO2_HIGH, Scd30.co2);
|
||||
#endif // USE_LIGHT
|
||||
break;
|
||||
|
||||
case ERROR_SCD30_NO_DATA:
|
||||
|
|
|
@ -34,6 +34,9 @@ struct EZOCO2 : public EZOStruct {
|
|||
// sensor has a 10s warmup period
|
||||
if (TasmotaGlobal.uptime >= 10) {
|
||||
CO2 = atoi(data);
|
||||
#ifdef USE_LIGHT
|
||||
LightSetSignal(CO2_LOW, CO2_HIGH, CO2);
|
||||
#endif // USE_LIGHT
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -166,6 +166,9 @@ void Scd40Update(void)
|
|||
scd40Loop_count = 0;
|
||||
scd40IsDataValid = true;
|
||||
scd40GoodMeas_count++;
|
||||
#ifdef USE_LIGHT
|
||||
LightSetSignal(CO2_LOW, CO2_HIGH, scd40_CO2);
|
||||
#endif // USE_LIGHT
|
||||
break;
|
||||
|
||||
case ERROR_SCD40_NO_DATA:
|
||||
|
|
Loading…
Reference in New Issue