Remove servicedatauuid only when model is present (#1186)

keep it if we haven't decoded the message
This commit is contained in:
Florian authored and GitHub committed 2022-03-15 17:44:39 -05:00
1 parent 3d2b15bd6c
commit fb56162c52
1 file changed
+1 -1
+1 -1
View File
@@ -914,7 +914,7 @@ void PublishDeviceData(JsonObject& BLEdata, bool processBLEData) {
if (processBLEData) process_bledata(BLEdata);
if (!publishOnlySensors || BLEdata.containsKey("model") || BLEdata.containsKey("distance")) {
# if !pubBLEServiceUUID
RemoveJsonPropertyIf(BLEdata, "servicedatauuid", BLEdata.containsKey("servicedatauuid"));
RemoveJsonPropertyIf(BLEdata, "servicedatauuid", BLEdata.containsKey("model") && BLEdata.containsKey("servicedatauuid"));
# endif
# if !pubKnownBLEServiceData
RemoveJsonPropertyIf(BLEdata, "servicedata", BLEdata.containsKey("model") && BLEdata.containsKey("servicedata"));