From 4de26c8bc419cc4d8eaa85d8d7c62553a6c7c74e Mon Sep 17 00:00:00 2001 From: lumapu Date: Sat, 6 Apr 2024 01:37:06 +0200 Subject: [PATCH] 0.8.106 * change MqTT return value of power limit acknowledge from `boolean` to `float`. The value returned is the same as it was set to confirm reception (not the read back value) --- src/CHANGES.md | 1 + src/publisher/pubMqtt.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CHANGES.md b/src/CHANGES.md index 23b671b4..9f2f020d 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -3,6 +3,7 @@ ## 0.8.106 - 2024-04-05 * fix bootloop with CMT and NRF on ESP32 #1566 #1562 * possible fix of #1553 +* change MqTT return value of power limit acknowledge from `boolean` to `float`. The value returned is the same as it was set to confirm reception (not the read back value) ## 0.8.105 - 2024-04-05 * cleanup of `defines.h` diff --git a/src/publisher/pubMqtt.h b/src/publisher/pubMqtt.h index 2ba8ac1a..91227c05 100644 --- a/src/publisher/pubMqtt.h +++ b/src/publisher/pubMqtt.h @@ -243,7 +243,8 @@ class PubMqtt { void setPowerLimitAck(Inverter<> *iv) { if (NULL != iv) { snprintf(mSubTopic.data(), mSubTopic.size(), "%s/%s", iv->config->name, subtopics[MQTT_ACK_PWR_LMT]); - publish(mSubTopic.data(), "true", true, true, QOS_2); + snprintf(mVal.data(), mVal.size(), "%.1f", iv->powerLimit[0]/10.0); + publish(mSubTopic.data(), mVal.data(), true, true, QOS_2); } }