VW: respect home region
This commit is contained in:
parent
28dc71cdbb
commit
4828d197d6
1 changed files with 5 additions and 1 deletions
|
|
@ -66,7 +66,11 @@ func NewVWFromConfig(other map[string]interface{}) (api.Vehicle, error) {
|
|||
}
|
||||
}
|
||||
|
||||
v.Provider = vw.NewProvider(api, strings.ToUpper(cc.VIN), cc.Cache)
|
||||
if err == nil {
|
||||
if err = api.HomeRegion(strings.ToUpper(cc.VIN)); err == nil {
|
||||
v.Provider = vw.NewProvider(api, strings.ToUpper(cc.VIN), cc.Cache)
|
||||
}
|
||||
}
|
||||
|
||||
return v, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue