Internal clock ESPHome CO2 sensor MHZ19B - reset on poor wifi?

Hello,

I have D1 mini ESP8266 with a CO2 sensor MH-Z19B. This sensor has the functionality that resets to the lowest baseline of 400 ppm over the 24h period. This works well and sensor is working well however when I place the sensor in a bedroom that has somewhat poor wifi, it seems to continuously reset to the baseline while it should grow overnight… I bring the same sensor in a different bedroom with stronger wifi and it performed as expected, i.e. CO2 level increases during nighttime when ventilation system is set at low and it goes down when opening windows / increase ventilation speed to normal.

The same behavior was with an ESP32 dev board…

My suspicion is that at any wifi interruption the internal clock or some counter is reset and this is causing this behavior. ESPHome developers am I making any sense here :slight_smile:

Many thanks!