diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 8f5d400eb..5df9d20ee 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -824,7 +824,6 @@ // -- Power monitoring sensors -------------------- #define USE_ENERGY_SENSOR // Add support for Energy Monitors (+14k code) -#define USE_ENERGY_COLUMN_GUI // Add support for column display in GUI (+0k5 code) #define USE_ENERGY_MARGIN_DETECTION // Add support for Energy Margin detection (+1k6 code) #define USE_ENERGY_POWER_LIMIT // Add additional support for Energy Power Limit detection (+1k2 code) #define USE_ENERGY_DUMMY // Add support for dummy Energy monitor allowing user values (+0k7 code) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino index c9866ef67..cd3c61770 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino @@ -215,7 +215,6 @@ char* WebEnergyFmt(float* input, uint32_t resolution, uint32_t single) { single = 0; } } -#ifdef USE_ENERGY_COLUMN_GUI ext_snprintf_P(Energy->value, GUISZ, PSTR("")); // Skip first column if ((Energy->phase_count > 1) && single) { // Need to set colspan so need new columns // 1.23  @@ -234,13 +233,6 @@ char* WebEnergyFmt(float* input, uint32_t resolution, uint32_t single) { } } ext_snprintf_P(Energy->value, GUISZ, PSTR("%s"), Energy->value); -#else // not USE_ENERGY_COLUMN_GUI - uint32_t index = (single) ? 1 : Energy->phase_count; // 1,2,3 - Energy->value[vidx][0] = '\0'; - for (uint32_t i = 0; i < index; i++) { - ext_snprintf_P(Energy->value, GUISZ, PSTR("%s%s%*_f"), Energy->value, (i)?" / ":"", resolution, &input[i]); - } -#endif // USE_ENERGY_COLUMN_GUI return Energy->value; } #endif // USE_WEBSERVER @@ -1389,7 +1381,6 @@ void EnergyShow(bool json) { #endif // USE_KNX #ifdef USE_WEBSERVER } else { -#ifdef USE_ENERGY_COLUMN_GUI // Need a new table supporting more columns using empty columns (with   in data rows) as easy column spacing // {s}Head1{e} // {s}Head1Head2{e} @@ -1403,7 +1394,6 @@ void EnergyShow(bool json) { WSContentSend_P(PSTR("%s%s"), (no_label)?"":(label_o)?"O":"L", (no_label)?"":itoa(i +1, number, 10)); } WSContentSend_P(PSTR("{e}")); // Last column is units ({e} = ) -#endif // USE_ENERGY_COLUMN_GUI if (Energy->voltage_available) { WSContentSend_PD(HTTP_SNS_VOLTAGE, WebEnergyFmt(Energy->voltage, Settings->flag2.voltage_resolution, voltage_common)); } @@ -1431,10 +1421,8 @@ void EnergyShow(bool json) { uint32_t single = (!isnan(Energy->export_active[1]) && !isnan(Energy->export_active[2])) ? 2 : 1; WSContentSend_PD(HTTP_SNS_EXPORT_ACTIVE, WebEnergyFmt(Energy->export_active, Settings->flag2.energy_resolution, single)); } -#ifdef USE_ENERGY_COLUMN_GUI XnrgCall(FUNC_WEB_COL_SENSOR); WSContentSend_P(PSTR("
{t}")); // {t} = - Define for next FUNC_WEB_SENSOR -#endif // USE_ENERGY_COLUMN_GUI XnrgCall(FUNC_WEB_SENSOR); #endif // USE_WEBSERVER } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino index b67e347e7..0070dbe55 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino @@ -442,7 +442,6 @@ char* WebEnergyFmt(float* input, uint32_t resolution, uint32_t single) { single = 0; } } -#ifdef USE_ENERGY_COLUMN_GUI ext_snprintf_P(Energy->value, GUISZ, PSTR("")); // Skip first column if ((Energy->gui_count > 1) && single) { // Need to set colspan so need new columns // ) -#endif // USE_ENERGY_COLUMN_GUI if (Energy->voltage_available) { WSContentSend_PD(HTTP_SNS_VOLTAGE, WebEnergyFmt(Energy->voltage, Settings->flag2.voltage_resolution, voltage_common)); } @@ -1712,10 +1702,8 @@ void EnergyShow(bool json) { WSContentSend_PD(HTTP_SNS_EXPORT_ACTIVE, WebEnergyFmt(Energy->export_active, Settings->flag2.energy_resolution, single)); } -#ifdef USE_ENERGY_COLUMN_GUI XnrgCall(FUNC_WEB_COL_SENSOR); WSContentSend_P(PSTR("
1.23  @@ -461,13 +460,6 @@ char* WebEnergyFmt(float* input, uint32_t resolution, uint32_t single) { } } ext_snprintf_P(Energy->value, GUISZ, PSTR("%s"), Energy->value); -#else // not USE_ENERGY_COLUMN_GUI - uint32_t index = (single) ? 1 : Energy->phase_count; // 1,2,3 - Energy->value[0] = '\0'; - for (uint32_t i = 0; i < index; i++) { - ext_snprintf_P(Energy->value, GUISZ, PSTR("%s%s%*_f"), Energy->value, (i)?" / ":"", resolution, &input[i]); - } -#endif // USE_ENERGY_COLUMN_GUI return Energy->value; } #endif // USE_WEBSERVER @@ -1622,7 +1614,6 @@ void EnergyShow(bool json) { #endif // USE_KNX #ifdef USE_WEBSERVER } else { -#ifdef USE_ENERGY_COLUMN_GUI uint8_t relays[ENERGY_MAX_PHASES]; uint32_t relay_show = 0; power_t power = TasmotaGlobal.power; @@ -1683,7 +1674,6 @@ void EnergyShow(bool json) { (no_label) ? "" : itoa(relays[Energy->gui_offset +i], number, 10)); } WSContentSend_P(PSTR("{e}")); // Last column is units ({e} =

{t}")); // {t} = - Define for next FUNC_WEB_SENSOR -#endif // USE_ENERGY_COLUMN_GUI XnrgCall(FUNC_WEB_SENSOR); #endif // USE_WEBSERVER } diff --git a/tasmota/tasmota_xnrg_energy/xnrg_08_sdm120.ino b/tasmota/tasmota_xnrg_energy/xnrg_08_sdm120.ino index 8f2ea1fa1..9264be095 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_08_sdm120.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_08_sdm120.ino @@ -236,11 +236,7 @@ bool Xnrg08(uint32_t function) Sdm220Show(1); break; #ifdef USE_WEBSERVER -#ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: -#else // not USE_ENERGY_COLUMN_GUI - case FUNC_WEB_SENSOR: -#endif // USE_ENERGY_COLUMN_GUI Sdm220Show(0); break; #endif // USE_WEBSERVER diff --git a/tasmota/tasmota_xnrg_energy/xnrg_13_fif_le01mr.ino b/tasmota/tasmota_xnrg_energy/xnrg_13_fif_le01mr.ino index 9166b66c6..9d56c7b08 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_13_fif_le01mr.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_13_fif_le01mr.ino @@ -264,11 +264,7 @@ bool Xnrg13(uint32_t function) FifLEShow(1); break; #ifdef USE_WEBSERVER -#ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: -#else // not USE_ENERGY_COLUMN_GUI - case FUNC_WEB_SENSOR: -#endif // USE_ENERGY_COLUMN_GUI FifLEShow(0); break; #endif // USE_WEBSERVER diff --git a/tasmota/tasmota_xnrg_energy/xnrg_18_sdm72.ino b/tasmota/tasmota_xnrg_energy/xnrg_18_sdm72.ino index a1fcaa628..b5f3c0379 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_18_sdm72.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_18_sdm72.ino @@ -183,11 +183,7 @@ bool Xnrg18(uint32_t function) Sdm72Show(1); break; #ifdef USE_WEBSERVER -#ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: -#else // not USE_ENERGY_COLUMN_GUI - case FUNC_WEB_SENSOR: -#endif // USE_ENERGY_COLUMN_GUI Sdm72Show(0); break; #endif // USE_WEBSERVER diff --git a/tasmota/tasmota_xnrg_energy/xnrg_21_sdm230.ino b/tasmota/tasmota_xnrg_energy/xnrg_21_sdm230.ino index 647ddd2f8..5c6cd19ab 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_21_sdm230.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_21_sdm230.ino @@ -248,11 +248,7 @@ bool Xnrg21(uint32_t function) Sdm230Show(1); break; #ifdef USE_WEBSERVER -#ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: -#else // not USE_ENERGY_COLUMN_GUI - case FUNC_WEB_SENSOR: -#endif // USE_ENERGY_COLUMN_GUI Sdm230Show(0); break; #endif // USE_WEBSERVER diff --git a/tasmota/tasmota_xnrg_energy/xnrg_23_ade7880.ino b/tasmota/tasmota_xnrg_energy/xnrg_23_ade7880.ino index 244d922f8..08fb4a11f 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_23_ade7880.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_23_ade7880.ino @@ -773,11 +773,7 @@ bool Xnrg23(uint32_t function) { Ade7880Show(1); break; #ifdef USE_WEBSERVER -#ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: -#else // not USE_ENERGY_COLUMN_GUI - case FUNC_WEB_SENSOR: -#endif // USE_ENERGY_COLUMN_GUI Ade7880Show(0); break; #endif // USE_WEBSERVER diff --git a/tasmota/tasmota_xnrg_energy/xnrg_29_modbus.ino b/tasmota/tasmota_xnrg_energy/xnrg_29_modbus.ino index dc127db33..a97da8f83 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_29_modbus.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_29_modbus.ino @@ -859,11 +859,7 @@ bool Xnrg29(uint32_t function) { EnergyModbusShow(1); break; #ifdef USE_WEBSERVER -#ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: -#else // not USE_ENERGY_COLUMN_GUI - case FUNC_WEB_SENSOR: -#endif // USE_ENERGY_COLUMN_GUI EnergyModbusShow(0); break; #endif // USE_WEBSERVER