More changes
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 24s

This commit is contained in:
2025-06-04 09:16:17 -04:00
parent f7c17b8bbf
commit 83e453cc7e

View File

@ -150,7 +150,7 @@ type Tire struct {
Position string
SubPosition string
Pressure int
PressurePsi string
PressurePsi int
Status string
Updated time.Time
}
@ -777,7 +777,7 @@ func (v *Vehicle) getAPIGen() string {
// }
// isEV .
// Get whether the specified VIN is an Electric Vehicle.
// Get whether the specified car is an Electric Vehicle.
func (v *Vehicle) isEV() bool {
return contains(v.Features, FEATURE_PHEV)
}
@ -822,7 +822,7 @@ func (v *Vehicle) parseLock(prefix, suffix, name string, value any) {
pos := strings.TrimPrefix(name, prefix)
pos = strings.TrimSuffix(pos, suffix)
submatchall := re.FindAllString(pos, -1)
// v.client.logger.Debug("VEHICLE COND", "key", name, "value", value, "number", len(submatchall))
v.client.logger.Debug("door lock status", "key", name, "value", value, "number", len(submatchall))
if door, ok := v.Doors[pos]; ok {
door.Lock = value.(string)
@ -880,14 +880,14 @@ func (v *Vehicle) parseTire(prefix, suffix, name string, value any) {
// v.client.logger.Debug("VEHICLE COND", "key", name, "data", value, "number", len(submatchall))
if tire, ok := v.Tires[pos]; ok {
tire.PressurePsi = value.(string)
tire.PressurePsi = value.(int)
tire.Updated = time.Now()
} else {
tire.PressurePsi = value.(string)
tire.PressurePsi = value.(int)
tire.Updated = time.Now()
v.Tires[pos] = Tire{
Position: submatchall[0],
PressurePsi: value.(string),
PressurePsi: value.(int),
Updated: time.Now(),
}
if len(submatchall) >= 2 {