Skip to content

Commit

Permalink
Ford: add chargeEndTime to status response (#4219)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElinaUrbanovich authored Aug 24, 2022
1 parent 7fc4a07 commit 2d1d159
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vehicle/ford/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ func (v *Provider) Position() (float64, float64, error) {
return res.VehicleStatus.Gps.Latitude, res.VehicleStatus.Gps.Longitude, err
}

var _ api.VehicleFinishTimer = (*Provider)(nil)

// FinishTime implements the api.VehicleFinishTimer interface
func (v *Provider) FinishTime() (time.Time, error) {
res, err := v.statusG()
return res.VehicleStatus.ChargeEndTime.Value.Time, err
}

var _ api.Resurrector = (*Provider)(nil)

// WakeUp implements the api.Resurrector interface
Expand Down
4 changes: 4 additions & 0 deletions vehicle/ford/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ type StatusResponse struct {
Value string
Timestamp Timestamp
}
ChargeEndTime struct {
Value Timestamp
Timestamp Timestamp
}
PlugStatus struct {
Value int
Timestamp Timestamp
Expand Down

0 comments on commit 2d1d159

Please sign in to comment.