use configured output format for min/max formatting (#709)

This commit is contained in:
John
2022-11-13 17:28:52 +01:00
parent 83aa36024a
commit 5898a0b135
+2 -2
View File
@@ -1079,11 +1079,11 @@ void MqttHandler::run() {
if (dataType->isNumeric()) {
auto dt = dynamic_cast<const NumberDataType*>(dataType);
ostr.str("");
if (dt->getMinMax(false, OF_NONE, &ostr) == RESULT_OK) {
if (dt->getMinMax(false, g_publishFormat, &ostr) == RESULT_OK) {
values.set("min", ostr.str());
ostr.str("");
}
if (dt->getMinMax(true, OF_NONE, &ostr) == RESULT_OK) {
if (dt->getMinMax(true, g_publishFormat, &ostr) == RESULT_OK) {
values.set("max", ostr.str());
}
}