mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add sections for MQTT Discovery
This commit is contained in:
@@ -58,6 +58,7 @@ WebCustomizationService::WebCustomizationService(AsyncWebServer * server, FS * f
|
||||
void WebCustomization::read(WebCustomization & customizations, JsonObject & root) {
|
||||
// Temperature Sensor customization
|
||||
JsonArray sensorsJson = root["ts"].to<JsonArray>();
|
||||
|
||||
for (const SensorCustomization & sensor : customizations.sensorCustomizations) {
|
||||
JsonObject sensorJson = sensorsJson.add<JsonObject>();
|
||||
sensorJson["id"] = sensor.id; // ID of chip
|
||||
|
||||
Reference in New Issue
Block a user