Skip to content

Commit

Permalink
update check
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Jan 26, 2024
1 parent 04aa2e8 commit 8ffd799
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3514,7 +3514,8 @@ class VwWeconnect extends utils.Adapter {
});
}
async getElliData(type) {
if (this.config.historyLimit === -1) {
if (this.config.historyLimit == -1) {
this.log.debug("Elli disabled in config");
return;
}
this.log.debug("Get Elli Data with history limit: " + this.config.historyLimit);
Expand Down Expand Up @@ -3638,6 +3639,11 @@ class VwWeconnect extends utils.Adapter {
}

getWcData(limit) {
if (this.config.historyLimit == -1) {
this.log.debug("WC disabled in config");
return;
}
this.log.debug("Get WC Data with history limit: " + this.config.historyLimit);
//check if latest fetching is minimum 15 minutes ago
if (this.lastWcFetch && this.lastWcFetch + 15 * 60 * 1000 > Date.now()) {
this.log.debug("We Charge data already fetched in last 15 minutes");
Expand Down

0 comments on commit 8ffd799

Please sign in to comment.