From af28d7b2eddff7d52b6a9099dd135868d2546646 Mon Sep 17 00:00:00 2001 From: Alex Savin Date: Wed, 4 Jun 2025 17:28:21 -0400 Subject: [PATCH] More changes --- mysubaru.go | 8 ++++---- vehicle.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mysubaru.go b/mysubaru.go index fc331a7..8a26eca 100644 --- a/mysubaru.go +++ b/mysubaru.go @@ -218,13 +218,13 @@ type VehicleCondition struct { RemainingFuelPercent int `json:"remainingFuelPercent,string"` // "66" Odometer int `json:"odometer"` // 92 OdometerUnit string `json:"odometerUnit"` // "MILES" - TirePressureFrontLeft int `json:"tirePressureFrontLeft,omitempty"` // null | 36 + TirePressureFrontLeft float64 `json:"tirePressureFrontLeft,omitempty"` // null | 36 TirePressureFrontLeftUnit string `json:"tirePressureFrontLeftUnit"` // "PSI" - TirePressureFrontRight int `json:"tirePressureFrontRight,omitempty"` // null | 36 + TirePressureFrontRight float64 `json:"tirePressureFrontRight,omitempty"` // null | 36 TirePressureFrontRightUnit string `json:"tirePressureFrontRightUnit"` // "PSI", - TirePressureRearLeft int `json:"tirePressureRearLeft,omitempty"` // null | 36 + TirePressureRearLeft float64 `json:"tirePressureRearLeft,omitempty"` // null | 36 TirePressureRearLeftUnit string `json:"tirePressureRearLeftUnit"` // "PSI" - TirePressureRearRight int `json:"tirePressureRearRight,omitempty"` // null | 36 + TirePressureRearRight float64 `json:"tirePressureRearRight,omitempty"` // null | 36 TirePressureRearRightUnit string `json:"tirePressureRearRightUnit"` // "PSI" DoorBootPosition string `json:"doorBootPosition"` // "CLOSED | OPEN" DoorEngineHoodPosition string `json:"doorEngineHoodPosition"` // "CLOSED | OPEN" diff --git a/vehicle.go b/vehicle.go index 6f32cbe..e7eeef8 100644 --- a/vehicle.go +++ b/vehicle.go @@ -906,13 +906,13 @@ func (v *Vehicle) parseTire(prefix, suffix, name string, value any) { // v.client.logger.Debug("VEHICLE COND", "key", name, "data", value, "number", len(submatchall)) if t, ok := v.Tires[pos]; ok { - t.Pressure = value.(int) + t.Pressure = int(value.(float64)) t.Updated = time.Now() v.Tires[pos] = t } else { v.Tires[pos] = Tire{ Position: submatchall[0], - Pressure: value.(int), + Pressure: int(value.(float64)), Updated: time.Now(), } if len(submatchall) >= 2 {