How to use the teslajs.climateStartAsync function in teslajs

To help you get started, we’ve selected a few teslajs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mseminatore / alexa-tesla / index.js View on Github external
.then( function(vehicles) {
        // get options object - which must include authToken and vehicleID
        var options = getOptionsFromCarName(session, carName);
        
        tjs.climateStartAsync(options)
        .done(function(result) {
            if (options.display_name) {
                res.say(options.display_name + "'s climate system is now on.").send();
            } else {
                res.say("Climate system is now on.").send();
            }
        });
    });