Skip to content

Commit

Permalink
[Lixee] Add Standard Rate and Fix Standard HCHP Rate (Koenkk#4091)
Browse files Browse the repository at this point in the history
* Lixee Add rate and better other

Add EASD02 for HCHP Rate
Add STANDARD BASE RATE

* [Lixee] Add Case For Standard Base Rate

* Fix Break
  • Loading branch information
SilentT-FR authored Apr 9, 2022
1 parent dffffdb commit d9b6618
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions devices/lixee.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -212,7 +213,8 @@ const tarifsDef = {
'DEMAIN',
'PEJP',
]},
histo_HCHP: {fname: 'Historique - HCHP',
histo_HCHP: {
fname: 'Historique - HCHP',
currentTarf: 'HC..', excluded: [
'BASE',
'EJPHN',
Expand All @@ -226,7 +228,8 @@ const tarifsDef = {
'DEMAIN',
'PEJP',
]},
histo_EJP: {fname: 'Historique - EJP',
histo_EJP: {
name: 'Historique - EJP',
currentTarf: 'EJP.', excluded: [
'BASE',
'HCHC',
Expand All @@ -239,7 +242,8 @@ const tarifsDef = {
'BBRHPJR',
'DEMAIN',
]},
histo_BBR: {fname: 'Historique - BBR',
histo_BBR: {
fname: 'Historique - BBR',
currentTarf: 'BBR', excluded: [
'BASE',
'HCHC',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit d9b6618

Please sign in to comment.