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

Why is ShiftState in DriveState an interface #9

Closed jsgoecke closed 8 years ago

jsgoecke commented 8 years ago

It seems it should be a string, more info here:

https://github.com/morrisonbrett/TeslaCommand/commit/7ca736a32ca63891409a38ffc58b18f9e020e8db#commitcomment-17589554

jsgoecke commented 8 years ago

This is because the Tesla API will return a nil rather than an empty string in some cases, therefore the type returned is inconsistent requiring and interface to be used.