Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetTemperature defaulting passenger and driver temperature to "LOW" #24

Open
pushc6 opened this issue Feb 9, 2019 · 3 comments
Open

Comments

@pushc6
Copy link

pushc6 commented Feb 9, 2019

Not sure if this is just an issue with the model 3, but when setting the temperature via the command and putting the proper temperature in celcius the car sets the temperature to "LOW" which is 15 degrees C. Can you confirm this is working on the model s, or is this perhaps a change to the API? Currently researching, but don't have access to a model s to compare against.

@jiosec
Copy link

jiosec commented Feb 5, 2020

I have the same problem. The fix:

--- a/commands.go
+++ b/commands.go
@@ -184,8 +184,9 @@ func (v Vehicle) LockDoors() error {
func (v Vehicle) SetTemprature(driver float64, passenger float64) error {
driveTemp := strconv.FormatFloat(driver, 'f', -1, 32)
passengerTemp := strconv.FormatFloat(passenger, 'f', -1, 32)

  •   apiUrl := BaseURL + "/vehicles/" + strconv.FormatInt(v.ID, 10) + "/command/set_temps?driver_temp=" + driveTemp + "&passenger_temp=" + passengerTemp
    
  •   _, err := ActiveClient.post(apiUrl, nil)
    
  •   apiUrl := BaseURL + "/vehicles/" + strconv.FormatInt(v.ID, 10) + "/command/set_temps"
    
  •   theJson := `{"driver_temp": "` + driveTemp + `", "passenger_temp":` + passengerTemp + `}`
    
  •   _, err := ActiveClient.post(apiUrl, []byte(theJson))
      return err
    

}

@bogosj
Copy link

bogosj commented Sep 21, 2020

Confirmed, this happens with my Model 3 as well. I'm unclear whether making this change would break other Model users or not, can you investigate?

@bogosj
Copy link

bogosj commented Sep 21, 2020

#33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants