diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index 7febc7a3bfb8..a6ad45ca492d 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -434,6 +434,8 @@ struct TasmotaGlobal_t { #ifdef USE_BERRY bool berry_fast_loop_enabled = false; // is Berry fast loop enabled, i.e. control is passed at each loop iteration #endif // USE_BERRY + + bool NeedSeparatorLine = false; // Determine if a separator line should be send to WebUI after sensor/driver output } TasmotaGlobal; TSettings* Settings = nullptr; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino index 69bdaddb2e44..0d15e278fb23 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino @@ -833,6 +833,8 @@ void _WSContentSendBuffer(bool decimal, const char * formatP, va_list arg) { int len = strlen(content); if (0 == len) { return; } // No content + TasmotaGlobal.NeedSeparatorLine = true; + if (decimal && (D_DECIMAL_SEPARATOR[0] != '.')) { for (uint32_t i = 0; i < len; i++) { if ('.' == content[i]) { @@ -1470,6 +1472,7 @@ bool HandleRootStatusRefresh(void) WSContentSend_P(PSTR("{t}")); if (Settings->web_time_end) { WSContentSend_P(PSTR("{s}" D_TIMER_TIME "{m}%s{e}"), GetDateAndTime(DT_LOCAL).substring(Settings->web_time_start, Settings->web_time_end).c_str()); + WSContentSend_P("
) + WSContentSend_P(PSTR(" |
---|
) bool label_o = voltage_common; bool no_label = (1 == Energy->phase_count); char number[4]; @@ -1448,7 +1448,7 @@ void EnergyShow(bool json) { WSContentSend_PD(HTTP_SNS_EXPORT_ACTIVE, WebEnergyFmt(Energy->export_active, Settings->flag2.energy_resolution, single)); } XnrgCall(FUNC_WEB_COL_SENSOR); - WSContentSend_P(PSTR(" |
---|
{e}"; +const char HTTP_MI32_HL_THIN[] PROGMEM = "{s} {m} {e}"; const char HTTP_MI32[] PROGMEM = "{s}MI ESP32 " MI32_VERSION "{m}%u%s / %u{e}"; const char HTTP_MI32_ALIAS[] PROGMEM = "{s}%s Alias{m}%s{e}"; -const char HTTP_MI32_MAC[] PROGMEM = "{s}%s %s{m}%s{e}"; -const char HTTP_RSSI[] PROGMEM = "{s}%s " D_RSSI "{m}%d dBm{e}"; -const char HTTP_BATTERY[] PROGMEM = "{s}%s " D_BATTERY "{m}%u %%{e}"; -const char HTTP_LASTBUTTON[] PROGMEM = "{s}%s Last Button{m}%u {e}"; -const char HTTP_EVENTS[] PROGMEM = "{s}%s Events{m}%u {e}"; -const char HTTP_NMT[] PROGMEM = "{s}%s No motion{m}> %u seconds{e}"; -const char HTTP_MI32_FLORA_DATA[] PROGMEM = "{s}%s Fertility{m}%u us/cm{e}"; -const char HTTP_MI32_HL[] PROGMEM = "{s} {m} {e}"; +const char HTTP_MI32_MAC[] PROGMEM = "{s}%s " D_MAC_ADDRESS "{m}%s{e}"; +const char HTTP_MI32_RSSI[] PROGMEM = "{s}%s " D_RSSI "{m}%d dBm{e}"; +const char HTTP_MI32_BATTERY[] PROGMEM = "{s}%s " D_BATTERY "{m}%u %%{e}"; +const char HTTP_MI32_LASTBUTTON[] PROGMEM = "{s}%s Last Button{m}%u{e}"; +const char HTTP_MI32_EVENTS[] PROGMEM = "{s}%s Events{m}%u{e}"; +const char HTTP_MI32_NMT[] PROGMEM = "{s}%s No motion{m}> %u " D_SECONDS "{e}"; +const char HTTP_MI32_FLORA_DATA[] PROGMEM = "{s}%s Fertility{m}%u " D_UNIT_MICROSIEMENS_PER_CM "{e}"; const char HTTP_MI32_LIGHT[] PROGMEM = "{s}%s " D_LIGHT "{m}%d{e}"; const char HTTP_MISCALE_WEIGHT[] PROGMEM = "{s}%s " D_WEIGHT "{m}%*_f %s{e}"; const char HTTP_MISCALE_WEIGHT_REMOVED[] PROGMEM = "{s}%s Weight removed{m}%s{e}"; const char HTTP_MISCALE_WEIGHT_STABILIZED[] PROGMEM = "{s}%s Weight stabilized{m}%s{e}"; const char HTTP_MISCALE_IMPEDANCE[] PROGMEM = "{s}%s Impedance{m}%u{e}"; const char HTTP_MISCALE_IMPEDANCE_STABILIZED[] PROGMEM = "{s}%s Impedance stabilized{m}%s{e}"; -const char HTTP_SJWS01LM_FLOODING[] PROGMEM = "{s}%s Flooding{m}%u {e}"; +const char HTTP_SJWS01LM_FLOODING[] PROGMEM = "{s}%s Flooding{m}%u{e}"; //const char HTTP_NEEDKEY[] PROGMEM = "{s}%s %s{m} {e}"; +// "\">%s{m}{e}"; //const char HTTP_NEEDKEY[] PROGMEM = "{s}%s %s{m} {e}"; +// "\">%s{m}{e}"; const char HTTP_NEEDKEY[] PROGMEM = "{s}%s %s{m} {e}"; + "\">%s{m}{e}"; const char HTTP_PAIRING[] PROGMEM = "{s}%s Pair Button Pressed{m} {e}"; @@ -3521,7 +3522,7 @@ void MI32Show(bool json) WSContentSend_P(HTTP_MI32, i + 1, stemp, numsensors); for (i; i {e}"); } PROFILE_DRIVER("drv", function, profile_driver_start); diff --git a/tasmota/tasmota_xx2c_global/xsns_interface.ino b/tasmota/tasmota_xx2c_global/xsns_interface.ino index 2f020b92d3bd..83617f05ba0c 100644 --- a/tasmota/tasmota_xx2c_global/xsns_interface.ino +++ b/tasmota/tasmota_xx2c_global/xsns_interface.ino @@ -1123,6 +1123,7 @@ bool XsnsCall(uint32_t function) { for (uint32_t x = 0; x < xsns_present; x++) { if (XsnsEnabled(0, x)) { // Skip disabled sensor if ((FUNC_WEB_SENSOR == function) && !XsnsEnabled(1, x)) { continue; } // Skip web info for disabled sensors + TasmotaGlobal.NeedSeparatorLine = false; #ifdef USE_PROFILE_FUNCTION uint32_t profile_function_start = millis(); @@ -1139,9 +1140,9 @@ bool XsnsCall(uint32_t function) { PROFILE_FUNCTION("sns", index, function, profile_function_start); #endif // USE_PROFILE_FUNCTION - if (result && (function > FUNC_return_result)) { - break; - } + if (result && (function > FUNC_return_result)) break; + + if (FUNC_WEB_SENSOR == function && TasmotaGlobal.NeedSeparatorLine) WSContentSend_P(" {e}"); } } |