do not overwrite mqtt-json items

This commit is contained in:
MichaelDvP
2023-11-02 07:34:57 +01:00
parent e7b7002883
commit 1097b519ae

View File

@@ -1595,7 +1595,10 @@ bool EMSdevice::generate_values(JsonObject & output, const uint8_t tag_filter, c
} }
} }
} }
// do not overwrite
if (json.containsKey(name)) {
continue;
}
// handle Booleans // handle Booleans
if (dv.type == DeviceValueType::BOOL && Helpers::hasValue(*(uint8_t *)(dv.value_p), EMS_VALUE_BOOL)) { if (dv.type == DeviceValueType::BOOL && Helpers::hasValue(*(uint8_t *)(dv.value_p), EMS_VALUE_BOOL)) {
// see how to render the value depending on the setting // see how to render the value depending on the setting