Skip to content

Commit

Permalink
fix skodae
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Dec 22, 2023
1 parent 3bdf727 commit 655f5db
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
6 changes: 5 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"common": {
"name": "vw-connect",
"version": "0.4.2",
"version": "0.5.0",
"news": {
"0.5.0": {
"en": "Fix for SkodaE. Temporary disabled parking position and set min interval to 10min",
"de": "Fix für SkodaE. Parking Position und ein Update Interval unter 10min ist zur Zeit deaktiviert für SkodaE"
},
"0.4.2": {
"en": "Fix Volkswagen App status update and improve logging",
"de": "Fix für Volkswagen App Status Update und Verbesserung der Logging Ausgabe"
Expand Down
14 changes: 11 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class VwWeconnect extends utils.Adapter {

this.json2iob = new Json2iob(this);
this.jar = request.jar();
this.userAgent = "ioBroker v";
this.userAgent = "iobroker v";
this.refreshTokenInterval = null;
this.vwrefreshTokenInterval = null;
this.updateInterval = null;
Expand Down Expand Up @@ -287,6 +287,14 @@ class VwWeconnect extends utils.Adapter {
this.log.info("Interval of 0 is not allowed reset to 1");
this.config.interval = 1;
}
if (this.config.type === "skodae") {
this.log.info("Parking Postion is temporary disabled for Skoda E");
if (this.config.interval < 10) {
this.log.info("Interval under 10min is temporary not allowed for Skoda E reset to 10min");
this.config.interval = 10;
}
}

this.tripTypes = [];
if (this.config.tripShortTerm == true) {
this.tripTypes.push("shortTerm");
Expand Down Expand Up @@ -3278,11 +3286,11 @@ class VwWeconnect extends utils.Adapter {
const statusArray = [
{ path: "air-conditioning", version: "v1", postfix: "/status" },
{ path: "air-conditioning", version: "v1", postfix: "/settings" },
{ path: "air-conditioning", version: "v1", postfix: "/timers" },
// { path: "air-conditioning", version: "v1", postfix: "/timers" },
{ path: "charging", version: "v1", postfix: "/status" },
{ path: "charging", version: "v1", postfix: "/settings" },
{ path: "vehicle-status", version: "v2", postfix: "" },
{ path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth
// { path: "position/vehicles", version: "v1", postfix: "/parking-position" }, //need second auth
];

for (const status of statusArray) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@
"test:package": "mocha test/package --exit",
"test:unit": "mocha test/unit --exit"
},
"version": "0.4.2"
"version": "0.5.0"
}

0 comments on commit 655f5db

Please sign in to comment.