From 75364f89cb4f8f1b6ebd5d9ca382c56060adad61 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Thu, 16 Mar 2023 19:29:37 +0100 Subject: [PATCH] Publish all valid digits via mqtt --- src/MqttHandleInverter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MqttHandleInverter.cpp b/src/MqttHandleInverter.cpp index 3703630..67196fe 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)