diff --git a/src/vehicle-services/chargecurrent.ts b/src/vehicle-services/chargecurrent.ts index 17a93d6..7439bfd 100644 --- a/src/vehicle-services/chargecurrent.ts +++ b/src/vehicle-services/chargecurrent.ts @@ -30,7 +30,7 @@ export class ChargeCurrentService extends BaseService { async setLevel(value: CharacteristicValue, characteristic: Characteristic): Promise { 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)); } diff --git a/src/vehicle-services/chargelimit.ts b/src/vehicle-services/chargelimit.ts index 4ac653d..bbc4813 100644 --- a/src/vehicle-services/chargelimit.ts +++ b/src/vehicle-services/chargelimit.ts @@ -30,7 +30,7 @@ export class ChargeLimitService extends BaseService { async setLevel(value: CharacteristicValue, characteristic: Characteristic): Promise { 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)); } diff --git a/src/vehicle-services/chargeport.ts b/src/vehicle-services/chargeport.ts index 86dc59d..40f4660 100644 --- a/src/vehicle-services/chargeport.ts +++ b/src/vehicle-services/chargeport.ts @@ -23,7 +23,7 @@ export class ChargePortService extends BaseService { } async setState(value: CharacteristicValue, characteristic: Characteristic): Promise { - await this.accessory.wakeUpAndWait().then(() => + await this.parent.wakeUpAndWait().then(() => value === 1 ? this.vehicle.charge_port_door_close() .then(() =>