Skip to content

Commit

Permalink
Add the new endpoints to the Ruby gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr committed Sep 30, 2019
1 parent d29def2 commit 6664df5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/tesla_api/vehicle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ def set_temps(driver_temp, passenger_temp)
command('set_temps', body: {driver_temp: driver_temp, passenger_temp: passenger_temp})['response']
end

def set_preconditioning_max(on)
command('set_preconditioning_max', body: {on: on})['response']
end

def auto_conditioning_start
command('auto_conditioning_start')['response']
end
Expand All @@ -137,6 +141,10 @@ def sun_roof_move(percent)
command('sun_roof_control', body: {state: 'move', percent: percent})['response']
end

def window_control(command)
command('window_control', body: {command: command, lat: 0, lon: 0})['response']
end

def remote_start_drive(password)
command('remote_start_drive', body: {password: password})['response']
end
Expand Down Expand Up @@ -174,6 +182,10 @@ def navigation_request(address)
})['response']
end

def share(text)
navigation_request(text)
end

def schedule_software_update(offset_sec = 0)
command('schedule_software_update', body: {offset_sec: offset_sec})['response']
end
Expand All @@ -194,6 +206,10 @@ def set_sentry_mode(on)
command('set_sentry_mode', body: {on: on})['response']
end

def trigger_homelink(lat, lon)
command('trigger_homelink', body: {lat: lat, lon: lon})['response']
end

private

def data_request(name)
Expand Down

0 comments on commit 6664df5

Please sign in to comment.