mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
minor fix for default mqtt_nestedjson cmd
This commit is contained in:
@@ -1880,7 +1880,7 @@ bool MyESP::_fs_loadConfig() {
|
||||
_mqtt_keepalive = mqtt["keepalive"] | MQTT_KEEPALIVE;
|
||||
_mqtt_retain = mqtt["retain"];
|
||||
_mqtt_qos = mqtt["qos"] | MQTT_QOS;
|
||||
_mqtt_nestedjson = mqtt["nestedjson"] | true; // default to on
|
||||
_mqtt_nestedjson = mqtt["nestedjson"]; // default to on
|
||||
_mqtt_password = strdup(mqtt["password"] | "");
|
||||
_mqtt_base = strdup(mqtt["base"] | MQTT_BASE_DEFAULT);
|
||||
|
||||
|
||||
@@ -867,7 +867,6 @@ void publishEMSValues_mixing() {
|
||||
|
||||
// For SM10 and SM100/SM200 Solar Modules
|
||||
void publishEMSValues_solar() {
|
||||
char s[20] = {0}; // for formatting strings
|
||||
StaticJsonDocument<MQTT_MAX_PAYLOAD_SIZE> doc;
|
||||
char data[MQTT_MAX_PAYLOAD_SIZE] = {0};
|
||||
JsonObject rootSM = doc.to<JsonObject>();
|
||||
@@ -882,6 +881,7 @@ void publishEMSValues_solar() {
|
||||
rootSM[SM_PUMPMODULATION] = EMS_SolarModule.pumpModulation;
|
||||
|
||||
if (EMS_SolarModule.pump != EMS_VALUE_BOOL_NOTSET) {
|
||||
char s[20] = {0}; // for formatting strings
|
||||
rootSM[SM_PUMP] = _bool_to_char(s, EMS_SolarModule.pump);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user