diff --git a/src/MqttHandleInverter.cpp b/src/MqttHandleInverter.cpp index 3703630c..67196fec 100644 --- a/src/MqttHandleInverter.cpp +++ b/src/MqttHandleInverter.cpp @@ -126,7 +126,9 @@ void MqttHandleInverterClass::publishField(std::shared_ptr inv return; } - MqttSettings.publish(topic, String(inv->Statistics()->getChannelFieldValue(type, channel, fieldId))); + MqttSettings.publish(topic, String( + inv->Statistics()->getChannelFieldValue(type, channel, fieldId), + static_cast(inv->Statistics()->getChannelFieldDigits(type, channel, fieldId)))); } String MqttHandleInverterClass::getTopic(std::shared_ptr inv, ChannelType_t type, ChannelNum_t channel, FieldId_t fieldId)