Class: TeslaAPI::GUISettings

Inherits:
Data
  • Object
show all
Defined in:
lib/tesla-api/gui_settings.rb

Overview

Defines the current user settings for the vehicle’s graphical display

Instance Method Summary collapse

Methods inherited from Data

#inspect, #ivar_from_data, #method_missing, #respond_to_missing?

Constructor Details

#initialize(data) ⇒ GUISettings

Returns a new instance of GUISettings.



25
26
27
28
29
30
31
# File 'lib/tesla-api/gui_settings.rb', line 25

def initialize(data)
  ivar_from_data("gui_distance_units",    "gui_distance_units",    data)
  ivar_from_data("gui_temperature_units", "gui_temperature_units", data)
  ivar_from_data("gui_charge_rate_units", "gui_charge_rate_units", data)
  ivar_from_data("gui_24_hour_time",      "gui_24_hour_time",      data)
  ivar_from_data("gui_range_display",     "gui_range_display",     data)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TeslaAPI::Data

Instance Method Details

#gui_24_hour_time?Boolean

true if the UI show 24 hour time (e.g. 17:45)

Returns:

  • (Boolean)


21
22
23
# File 'lib/tesla-api/gui_settings.rb', line 21

def gui_24_hour_time?
  @gui_24_hour_time
end

#gui_charge_rate_unitsString

Returns Units (“kW”) for showing charge rage.

Returns:

  • (String)

    Units (“kW”) for showing charge rage



# File 'lib/tesla-api/gui_settings.rb', line 12

#gui_distance_unitsString

Returns Units (“mi/hr”) for showing range.

Returns:

  • (String)

    Units (“mi/hr”) for showing range



# File 'lib/tesla-api/gui_settings.rb', line 4

#gui_range_displayString

Returns Units (“Rated”, “Ideal”) for showing range.

Returns:

  • (String)

    Units (“Rated”, “Ideal”) for showing range



# File 'lib/tesla-api/gui_settings.rb', line 16

#gui_temperature_unitsString

Returns Units (“F”, “C”) for showing temperaturs.

Returns:

  • (String)

    Units (“F”, “C”) for showing temperaturs



# File 'lib/tesla-api/gui_settings.rb', line 8