Skip to content

Commit d7d8439

Browse files
committed
revert last change
1 parent 08e40f7 commit d7d8439

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ To charge your vehicle with a constant amperage of 6A regardless of surplus, set
121121
### **WORK IN PROGRESS**
122122
* (Sneak-L8) new options to charge vehicle up to a specified SoC
123123
* (Sneak-L8) new option to stop charging at a certain SoC
124-
* (Sneak-L8) new behaviour in non pv mode: you can stop charging and adapter won't start by itself (like in passive mode but with active max power limitation)
125124
* (Sneak-L8) raise adapter-dev version from 1.4 to 1.5
126125
* (Sneak-L8) drop dependencies to chai, sinon and mocha
127126

main.js

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class Kecontact extends utils.Adapter {
5252
wallboxWarningSent = false; // Warning for inacurate regulation with Deutshcland Edition
5353
wallboxUnknownSent = false; // Warning wallbox not recognized
5454
isPassive = true; // no automatic power regulation?
55-
isSwitchedToNonPv = false;
5655
// eslint-disable-next-line jsdoc/check-tag-names
5756
/** @type {Date | null} */
5857
lastDeviceData = null; // time of last check for device information
@@ -467,9 +466,6 @@ class Kecontact extends utils.Adapter {
467466
if (oldValue != newValue) {
468467
this.log.info(`change of photovoltaics automatic from ${oldValue} to ${newValue}`);
469468
newValue = this.getBoolean(newValue);
470-
if (newValue === false) {
471-
this.isSwitchedToNonPv = true;
472-
}
473469
this.displayChargeMode();
474470
this.forceUpdateOfCalculation();
475471
}
@@ -2362,16 +2358,13 @@ class Kecontact extends utils.Adapter {
23622358
}
23632359
}
23642360
} else {
2365-
// in non pv mode charge with maximum power only if charging is actibated
2366-
if (this.isSwitchedToNonPv === true || this.getStateDefaultFalse(this.stateWallboxEnabled)) {
2367-
curr = tempMax; // no automatic active or vehicle not plugged to wallbox? Charging with maximum power possible
2368-
this.log.debug(`new current due to vehicle not plugged or pv automatics not active is ${curr}`);
2369-
this.isMaxPowerCalculation = true;
2370-
if (this.isVehiclePlugged()) {
2371-
newValueFor1p3pSwitching = this.valueFor3pCharging;
2372-
} else {
2373-
newValueFor1p3pSwitching = this.valueFor1p3pOff;
2374-
}
2361+
curr = tempMax; // no automatic active or vehicle not plugged to wallbox? Charging with maximum power possible
2362+
this.log.debug(`new current due to vehicle not plugged or pv automatics not active is ${curr}`);
2363+
this.isMaxPowerCalculation = true;
2364+
if (this.isVehiclePlugged()) {
2365+
newValueFor1p3pSwitching = this.valueFor3pCharging;
2366+
} else {
2367+
newValueFor1p3pSwitching = this.valueFor1p3pOff;
23752368
}
23762369
}
23772370
}
@@ -2438,7 +2431,6 @@ class Kecontact extends utils.Adapter {
24382431
}
24392432
this.log.debug(`wallbox set to charging maximum of ${curr} mA`);
24402433
this.regulateWallbox(curr);
2441-
this.isSwitchedToNonPv = false;
24422434
this.chargingToBeStarted = true;
24432435
}
24442436
}

0 commit comments

Comments
 (0)