Twc3: ignore disabling when vehicle is already disconnected

This commit is contained in:
andig 2023-10-06 17:52:25 +02:00
parent b4f31cae56
commit 7483374753

View file

@ -100,6 +100,12 @@ func (c *Twc3) Enable(enable bool) error {
return errors.New("loadpoint not initialized")
}
// ignore disabling when vehicle is already disconnected
// https://github.com/evcc-io/evcc/issues/10213
if status, err := c.Status(); status == api.StatusA && !enable || err != nil {
return err
}
v, ok := c.lp.GetVehicle().(api.VehicleChargeController)
if !ok {
return errors.New("vehicle not capable of start/stop")