Twc: wake-up vehicle if enable fails (#8684)
This commit is contained in:
parent
4d516d5844
commit
e88c994fec
1 changed files with 8 additions and 0 deletions
|
|
@ -693,6 +693,14 @@ func (lp *Loadpoint) setLimit(chargeCurrent float64, force bool) error {
|
|||
lp.elapseGuard()
|
||||
|
||||
if err := lp.charger.Enable(enabled); err != nil {
|
||||
v := lp.GetVehicle()
|
||||
if vv, ok := v.(api.Resurrector); enabled && ok && errors.Is(err, api.ErrAsleep) {
|
||||
// https://github.com/evcc-io/evcc/issues/8254
|
||||
// wakeup vehicle
|
||||
lp.log.DEBUG.Printf("charger %s: waking up vehicle", status[enabled])
|
||||
return vv.WakeUp()
|
||||
}
|
||||
|
||||
return fmt.Errorf("charger %s: %w", status[enabled], err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue