diff --git a/vehicle/ovms.go b/vehicle/ovms.go index 1f9a94fc3..c44505dd1 100644 --- a/vehicle/ovms.go +++ b/vehicle/ovms.go @@ -232,3 +232,10 @@ func (v *Ovms) Position() (float64, float64, error) { res, err := v.locationG() return res.Latitude, res.Longitude, err } + +var _ api.VehicleClimater = (*Ovms)(nil) + +func (v *Ovms) Climater() (bool, error) { + res, err := v.chargeG() + return res.Climater > 0, err +} diff --git a/vehicle/ovms/types.go b/vehicle/ovms/types.go index 3de29e469..290a1901d 100644 --- a/vehicle/ovms/types.go +++ b/vehicle/ovms/types.go @@ -15,6 +15,7 @@ type ChargeResponse struct { EstimatedRange int64 `json:"estimatedrange,string"` MessageAgeServer int `json:"m_msgage_s"` Soc float64 `json:"soc,string"` + Climater int `json:"staleambient"` } type LocationResponse struct {