1
0
mirror of https://github.com/revspace/operame synced 2024-12-04 13:47:29 +00:00

Don't publish invalid sensor readings to MQTT

This commit is contained in:
Juerd Waalboer 2020-12-22 05:19:51 +01:00
parent e5167278ee
commit 5687e04440

View File

@ -363,6 +363,7 @@ void loop() {
mqtt_interval,
[] {
if (!mqtt_enabled) return;
if (co2 <= 0) return;
connect_mqtt();
String message = mqtt_template;
message.replace("{}", String(co2));