Bluelink: add wakeup using forced update (#5996)

This commit is contained in:
nename0 2023-02-02 21:55:06 +01:00 • committed by GitHub
parent 6c9bc024d6
commit 8cb13e32c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,3 +194,12 @@ func (v *Provider) Position() (float64, float64, error) {
coord := res.ResMsg.VehicleStatusInfo.VehicleLocation.Coord
return coord.Lat, coord.Lon, err
}
var _ api.Resurrector = (*Provider)(nil)
// WakeUp implements the api.Resurrector interface
func (v *Provider) WakeUp() error {
// forcing an update will usually make the car start charging even if the (first) resulting status still says it does not charge...
_, err := v.refreshG()
return err
}