Tesla: ignore is_charging error

This commit is contained in:
andig 2023-08-20 13:31:24 +02:00
parent c928dd40f3
commit 6e88810fa9

View file

@ -212,7 +212,11 @@ var _ api.VehicleChargeController = (*Tesla)(nil)
// StartCharge implements the api.VehicleChargeController interface
func (v *Tesla) StartCharge() error {
return v.apiError(v.vehicle.StartCharging())
err := v.apiError(v.vehicle.StartCharging())
if err != nil && err.Error() == "is_charging" {
return nil
}
return err
}
// StopCharge implements the api.VehicleChargeController interface