From cd44b262b820d4e3d8a7b7a980cbc43998f7d6e4 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 22 Oct 2022 16:04:47 +0200 Subject: [PATCH] fix current tariff display in standard mode --- tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino b/tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino index d9ab9e85e..04afe6af4 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_15_teleinfo.ino @@ -886,7 +886,7 @@ const char HTTP_ENERGY_ID_TELEINFO[] PROGMEM = "{s}ID{m}%s{e}" ; const char HTTP_ENERGY_INDEX_TELEINFO[] PROGMEM = "{s}%s{m}%s " D_UNIT_WATTHOUR "{e}" ; const char HTTP_ENERGY_PAPP_TELEINFO[] PROGMEM = "{s}" D_POWERUSAGE "{m}%d " D_UNIT_WATT "{e}" ; //const char HTTP_ENERGY_IINST_TELEINFO[] PROGMEM = "{s}" D_CURRENT "%s{m}%d " D_UNIT_AMPERE "{e}" ; -const char HTTP_ENERGY_TARIF_TELEINFO[] PROGMEM = "{s}" D_CURRENT_TARIFF "{m}Heures %s{e}" ; +const char HTTP_ENERGY_TARIF_TELEINFO[] PROGMEM = "{s}" D_CURRENT_TARIFF "{m}%s%s{e}" ; const char HTTP_ENERGY_CONTRAT_TELEINFO[] PROGMEM = "{s}" D_CONTRACT "{m}%s %d" D_UNIT_AMPERE "{e}" ; const char HTTP_ENERGY_LOAD_TELEINFO[] PROGMEM = "{s}" D_POWER_LOAD "{m}%d" D_UNIT_PERCENT "{e}" ; const char HTTP_ENERGY_IMAX_TELEINFO[] PROGMEM = "{s}" D_MAX_CURRENT "{m}%d" D_UNIT_AMPERE "{e}" ; @@ -976,7 +976,11 @@ void TInfoShow(bool json) if (tarif) { GetTextIndexed(name, sizeof(name), tarif-1, kTarifName); - WSContentSend_P(HTTP_ENERGY_TARIF_TELEINFO, name); + if (tinfo_mode==TINFO_MODE_STANDARD ) { + WSContentSend_P(HTTP_ENERGY_TARIF_TELEINFO, "", name); + } else { + WSContentSend_P(HTTP_ENERGY_TARIF_TELEINFO, "Heures ", name); + } } if (contrat && isousc) { int percent = (int) ((Energy.current[0]*100.0f) / isousc) ;