fix #327, analogsensor sending multiple mqtt messages

This commit is contained in:
MichaelDvP
2022-01-31 13:39:30 +01:00
parent 3d1a050e22
commit acc2412742

View File

@@ -335,9 +335,8 @@ void AnalogSensor::publish_values(const bool force) {
doc[sensor.name()] = sensor.value(); doc[sensor.name()] = sensor.value();
} }
} }
Mqtt::publish(F("analogsensor_data"), doc.as<JsonObject>());
} }
Mqtt::publish(F("analogsensor_data"), doc.as<JsonObject>());
} }
// called from emsesp.cpp, similar to the emsdevice->get_value_info // called from emsesp.cpp, similar to the emsdevice->get_value_info