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

This commit is contained in:
2025-05-29 16:44:12 -04:00
parent 177955b7e0
commit 0476228b96

View File

@ -448,13 +448,12 @@ func (v *Vehicle) GetClimateQuickPresets() {
v.client.logger.Error("error while parsing data json", "request", "GetClimateQuickPresets", "error", err.Error())
}
cProfiles := []ClimateProfile{}
var cProfiles []ClimateProfile
err = json.Unmarshal([]byte(data), &cProfiles)
v.client.logger.Debug("climate quick presets", "data", data)
if err != nil {
v.client.logger.Error("error while parsing climate quick presets json", "request", "GetClimateQuickPresets", "error", err.Error())
}
v.client.logger.Debug("climate quick presets", "data", data)
if len(cProfiles) > 0 {
for _, cp := range cProfiles {
@ -492,13 +491,12 @@ func (v *Vehicle) GetClimatePresets() {
v.client.logger.Error("error while parsing data json", "request", "GetClimatePresets", "error", err.Error())
}
cProfiles := []ClimateProfile{}
var cProfiles []ClimateProfile
err = json.Unmarshal([]byte(data), &cProfiles)
v.client.logger.Debug("climate subaru presets", "data", data)
if err != nil {
v.client.logger.Error("error while parsing climate subaru presets json", "request", "GetClimatePresets", "error", err.Error())
}
v.client.logger.Debug("climate subaru presets", "data", data)
if len(cProfiles) > 0 {
for _, cp := range cProfiles {
@ -536,7 +534,7 @@ func (v *Vehicle) GetClimateUserPresets() {
v.client.logger.Error("error while parsing data json", "request", "GetClimateUserPresets", "error", err.Error())
}
cProfiles := []ClimateProfile{}
var cProfiles []ClimateProfile
err = json.Unmarshal([]byte(data), &cProfiles)
v.client.logger.Debug("climate user presets", "data", data)