From 0f340f807992c9edb31744732ab5b8e02236650d Mon Sep 17 00:00:00 2001 From: Christian Josepeit <72402991+PanNwt@users.noreply.github.com> Date: Sat, 15 Mar 2025 10:30:24 +0100 Subject: [PATCH] OVMS: add climater (#19796) --- vehicle/ovms.go | 7 +++++++ vehicle/ovms/types.go | 1 + 2 files changed, 8 insertions(+) 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 {