mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-03 00:18:24 +02:00
parent
3e6693ff30
commit
96eb32ca63
2 changed files with 4 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
|||
## 0.5.103
|
||||
* merged MI improvements, thx @rejoe2 #778
|
||||
* changed display inverter online message
|
||||
* merged heap improvements #772
|
||||
|
||||
## 0.5.102
|
||||
* Warning: old exports are not compatible any more!
|
||||
|
|
|
@ -210,7 +210,7 @@ class PubMqtt {
|
|||
DPRINTLN(DBG_VERBOSE, F("sendMqttDiscoveryConfig"));
|
||||
|
||||
char topic[64], name[32], uniq_id[32];
|
||||
StaticJsonDocument<256> doc;
|
||||
DynamicJsonDocument doc(256);
|
||||
|
||||
uint8_t fldTotal[4] = {FLD_PAC, FLD_YT, FLD_YD, FLD_PDC};
|
||||
const char* unitTotal[4] = {"W", "kWh", "Wh", "W"};
|
||||
|
@ -267,7 +267,7 @@ class PubMqtt {
|
|||
stateCls = getFieldStateClass(fldTotal[i]);
|
||||
}
|
||||
|
||||
StaticJsonDocument<512> doc2;
|
||||
DynamicJsonDocument doc2(512);
|
||||
doc2[F("name")] = name;
|
||||
doc2[F("stat_t")] = String(mCfgMqtt->topic) + "/" + ((!total) ? String(iv->config->name) : "total" ) + String(topic);
|
||||
doc2[F("unit_of_meas")] = ((!total) ? (iv->getUnit(i,rec)) : (unitTotal[i]));
|
||||
|
@ -359,7 +359,7 @@ class PubMqtt {
|
|||
if(NULL == mSubscriptionCb)
|
||||
return;
|
||||
|
||||
StaticJsonDocument<128> json;
|
||||
DynamicJsonDocument json(128);
|
||||
JsonObject root = json.to<JsonObject>();
|
||||
|
||||
bool limitAbs = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue