Skip to content

Commit

Permalink
Fix more wake up
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Jun 18, 2024
1 parent 99223c3 commit f1bb8cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vehicle-services/chargecurrent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ChargeCurrentService extends BaseService {
async setLevel(value: CharacteristicValue, characteristic: Characteristic): Promise<void> {
value = Math.max(this.min, Math.min(this.max, value as number));

await this.accessory.wakeUpAndWait()
await this.parent.wakeUpAndWait()
.then(() => this.parent.vehicle.set_charging_amps(value))
.then(() => characteristic.updateValue(value));
}
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/chargelimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ChargeLimitService extends BaseService {

async setLevel(value: CharacteristicValue, characteristic: Characteristic): Promise<void> {
value = Math.max(this.min, Math.min(this.max, value as number));
await this.accessory.wakeUpAndWait()
await this.parent.wakeUpAndWait()
.then(() => this.vehicle.set_charge_limit(value))
.then(() => characteristic.updateValue(value));
}
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle-services/chargeport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class ChargePortService extends BaseService {
}

async setState(value: CharacteristicValue, characteristic: Characteristic): Promise<void> {
await this.accessory.wakeUpAndWait().then(() =>
await this.parent.wakeUpAndWait().then(() =>
value === 1 ?
this.vehicle.charge_port_door_close()
.then(() =>
Expand Down

0 comments on commit f1bb8cf

Please sign in to comment.