Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/httpserver/json_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ static int http_tasmota_json_SENSOR(void* request, jsonCb_t printer) {
float chan_val1, chan_val2;
int channel_1, channel_2, g_pin_1 = 0;
printer(request, ",");
#ifndef NO_CHIP_TEMPERATURE
// printer(request, "\"%s\":{\"Temperature\": %.1f},", PLATFORM_MCU_NAME, g_wifi_temperature);
printer(request, "\"ESP32\":{\"Temperature\": %.1f},", g_wifi_temperature);
#endif
if (DRV_IsRunning("SHT3X")) {
g_pin_1 = PIN_FindPinIndexForRole(IOR_SHT3X_DAT, g_pin_1);
channel_1 = g_cfg.pins.channels[g_pin_1];
Expand Down Expand Up @@ -408,7 +412,11 @@ static int http_tasmota_json_status_SNS(void* request, jsonCb_t printer, bool bA
bHasAnyDHT = true;
break;
}
#ifdef NO_CHIP_TEMPERATURE
if (DRV_IsSensor() || bHasAnyDHT) {
#else
if (1) {
#endif
http_tasmota_json_SENSOR(request, printer);
JSON_PrintKeyValue_String(request, printer, "TempUnit", "C", false);
}
Expand Down