mirror of
https://github.com/revspace/operame
synced 2026-01-08 03:06:32 +00:00
Don't publish invalid sensor readings to MQTT
This commit is contained in:
parent
e5167278ee
commit
5687e04440
1 changed files with 1 additions and 0 deletions
|
|
@ -363,6 +363,7 @@ void loop() {
|
||||||
mqtt_interval,
|
mqtt_interval,
|
||||||
[] {
|
[] {
|
||||||
if (!mqtt_enabled) return;
|
if (!mqtt_enabled) return;
|
||||||
|
if (co2 <= 0) return;
|
||||||
connect_mqtt();
|
connect_mqtt();
|
||||||
String message = mqtt_template;
|
String message = mqtt_template;
|
||||||
message.replace("{}", String(co2));
|
message.replace("{}", String(co2));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue