OVMS: add climater (#19796)

This commit is contained in:
Christian Josepeit 2025-03-15 10:30:24 +01:00 • committed by GitHub
parent 8bb57b531a
commit 0f340f8079
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -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
}

View file

@ -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 {