jsgoecke / tesla

Provides a wrapper around the API to easily query and command a Telsa car. As of now this has been used with a Model S, a Model X, and a Model 3.
MIT License
325 stars 73 forks source link

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

Open pushc6 opened 5 years ago

pushc6 commented 5 years ago

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 commented 4 years ago

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)

bogosj commented 4 years ago

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 commented 4 years ago

https://github.com/jsgoecke/tesla/pull/33