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

This commit is contained in:
2025-05-29 10:58:00 -04:00
parent 3d808eb3b9
commit ed2495ee5c
2 changed files with 37 additions and 37 deletions

View File

@ -629,7 +629,7 @@ func (v *Vehicle) GetVehicleStatus() {
}
}
if strings.HasPrefix(key, "window") && strings.HasSuffix(key, "Status") {
pos := strings.TrimPrefix(key, "door")
pos := strings.TrimPrefix(key, "window")
pos = strings.TrimSuffix(pos, "Status")
submatchall := re.FindAllString(pos, -1)
v.client.logger.Debug("VEHICLE COND", "key", key, "data", child.Data(), "number", len(submatchall))
@ -801,7 +801,7 @@ func (v *Vehicle) GetVehicleCondition() {
}
}
if strings.HasPrefix(key, "window") && strings.HasSuffix(key, "Status") {
pos := strings.TrimPrefix(key, "door")
pos := strings.TrimPrefix(key, "window")
pos = strings.TrimSuffix(pos, "Status")
submatchall := re.FindAllString(pos, -1)
v.client.logger.Debug("VEHICLE COND", "key", key, "data", child.Data(), "number", len(submatchall))