Twc3: ignore disabling when vehicle is already disconnected
This commit is contained in:
parent
b4f31cae56
commit
7483374753
1 changed files with 6 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue