Working on fixing a Quick Climate Preset
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 24s
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 24s
This commit is contained in:
@ -516,10 +516,10 @@ func (v *Vehicle) GetClimateQuickPresets() {
|
|||||||
v.client.logger.Error("error while parsing json", "request", "GetClimatePresets", "error", err.Error())
|
v.client.logger.Error("error while parsing json", "request", "GetClimatePresets", "error", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
re1 := regexp.MustCompile(`\"`)
|
// re1 := regexp.MustCompile(`\"`)
|
||||||
result := re1.ReplaceAllString(string(tmp.Data), "")
|
// result := re1.ReplaceAllString(string(tmp.Data), "")
|
||||||
re2 := regexp.MustCompile(`\\`)
|
re := regexp.MustCompile(`\\`)
|
||||||
result = re2.ReplaceAllString(result, `"`) // \u0022
|
result := re.ReplaceAllString(string(tmp.Data), "") // \u0022
|
||||||
|
|
||||||
var cProfiles []ClimateProfile
|
var cProfiles []ClimateProfile
|
||||||
err = json.Unmarshal([]byte(result), &cProfiles)
|
err = json.Unmarshal([]byte(result), &cProfiles)
|
||||||
|
Reference in New Issue
Block a user