Skip to content

Commit

Permalink
remove charging update first start
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Nov 27, 2024
1 parent 84c7853 commit 14899d1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Bmw extends utils.Adapter {
await this.sleep(5000);
this.log.info('Initial first update of the vehicles');
await this.updateDevices();
this.log.info('Update Trips and Demands in 10 minutes');
this.log.info('First update of Trips and Demands in 10 minutes');
this.setTimeout(
async () => {
await this.updateDemands();
Expand Down Expand Up @@ -498,16 +498,12 @@ class Bmw extends utils.Adapter {
native: {},
});
});
if (vehicle.state && vehicle.state.electricChargingState && !vehicle.state.electricChargingState.remainingChargingMinutes) {
vehicle.state.electricChargingState.remainingChargingMinutes = 0;
}

this.json2iob.parse(vehicle.vin, vehicle, {
forceIndex: true,
descriptions: this.description,
channelName: vehicleName,
});

await this.updateChargingSessionv2(vehicle.vin, 200);
}
})
.catch((error) => {
Expand Down

0 comments on commit 14899d1

Please sign in to comment.