From d9b66186a8168f73feaf877c41cabc642e0fa314 Mon Sep 17 00:00:00 2001 From: SilentT Date: Sat, 9 Apr 2022 18:58:33 +0200 Subject: [PATCH] [Lixee] Add Standard Rate and Fix Standard HCHP Rate (#4091) * Lixee Add rate and better other Add EASD02 for HCHP Rate Add STANDARD BASE RATE * [Lixee] Add Case For Standard Base Rate * Fix Break --- devices/lixee.js | 49 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/devices/lixee.js b/devices/lixee.js index b46b7c8063651..e7930d71baa6f 100644 --- a/devices/lixee.js +++ b/devices/lixee.js @@ -196,7 +196,8 @@ const fzLocal = { // we are doing it with exclusion and not inclusion because the list is dynamic (based on zlinky mode), // and change based on that. Just some few attributes are useless, so we exclude them const tarifsDef = { - histo_BASE: {fname: 'Historique - BASE', + histo_BASE: { + fname: 'Historique - BASE', currentTarf: 'BASE', excluded: [ 'HCHC', 'HCHP', @@ -212,7 +213,8 @@ const tarifsDef = { 'DEMAIN', 'PEJP', ]}, - histo_HCHP: {fname: 'Historique - HCHP', + histo_HCHP: { + fname: 'Historique - HCHP', currentTarf: 'HC..', excluded: [ 'BASE', 'EJPHN', @@ -226,7 +228,8 @@ const tarifsDef = { 'DEMAIN', 'PEJP', ]}, - histo_EJP: {fname: 'Historique - EJP', + histo_EJP: { + name: 'Historique - EJP', currentTarf: 'EJP.', excluded: [ 'BASE', 'HCHC', @@ -239,7 +242,8 @@ const tarifsDef = { 'BBRHPJR', 'DEMAIN', ]}, - histo_BBR: {fname: 'Historique - BBR', + histo_BBR: { + fname: 'Historique - BBR', currentTarf: 'BBR', excluded: [ 'BASE', 'HCHC', @@ -248,7 +252,8 @@ const tarifsDef = { 'EJPHPM', 'PEJP', ]}, - stand_SEM_WE_MERCR: {fname: 'Standard - Sem WE Mercredi', + stand_SEM_WE_MERCR: { + fname: 'Standard - Sem WE Mercredi', currentTarf: 'SEM WE MERCREDI', excluded: [ 'EASF04', 'EASF05', @@ -271,8 +276,10 @@ const tarifsDef = { 'PJOURF+1', 'PPOINTE1', ]}, - stand_HPHC: {fname: 'Standard - Heure Pleine Heure Creuse', - currentTarf: 'H PLEINE/CREUSE', excluded: [ + stand_BASE: { + fname: 'Standard - BASE', + currentTarf: 'BASE', + excluded: [ 'EASF03', 'EASF04', 'EASF05', @@ -295,8 +302,33 @@ const tarifsDef = { 'PJOURF+1', 'PPOINTE1', ]}, + stand_HPHC: { + fname: 'Standard - Heure Pleine Heure Creuse', + currentTarf: 'H PLEINE/CREUSE', excluded: [ + 'EASF03', + 'EASF04', + 'EASF05', + 'EASF06', + 'EASF07', + 'EASF08', + 'EASF09', + 'EASF10', + 'EASD03', + 'EASD04', + 'DPM1', + 'DPM2', + 'DPM3', + 'FPM1', + 'FPM2', + 'FPM3', + 'NJOURF', + 'NJOURF+1', + 'PJOURF+1', + 'PPOINTE1', + ]}, }; + const linkyModeDef = { standard: 'standard', legacy: 'historique', @@ -505,6 +537,9 @@ function getCurrentConfig(device, options, logger=console) { case linkyMode == linkyModeDef.standard && tarifsDef.stand_HPHC.currentTarf: myExpose = myExpose.filter((a) => !tarifsDef.stand_HPHC.excluded.includes(a.exposes.name)); break; + case linkyMode == linkyModeDef.standard && tarifsDef.stand_BASE.currentTarf: + myExpose = myExpose.filter((a) => !tarifsDef.stand_BASE.excluded.includes(a.exposes.name)); + break; default: break; }